From 51ce2fe766ba189771b32a50be2e2592d64c9f4f Mon Sep 17 00:00:00 2001 From: Klaus Aehlig Date: Wed, 6 Nov 2024 12:27:04 +0100 Subject: Make bootstrap-traverser aware of the "cwd" property of actions --- bin/bootstrap-traverser.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'bin/bootstrap-traverser.py') diff --git a/bin/bootstrap-traverser.py b/bin/bootstrap-traverser.py index 30187078..9b82b338 100755 --- a/bin/bootstrap-traverser.py +++ b/bin/bootstrap-traverser.py @@ -106,7 +106,10 @@ def run_action(action_id: str, *, config: Json, root: str, graph: Json) -> str: for out in action_desc["output"]: os.makedirs(os.path.join(action_dir, os.path.dirname(out)), exist_ok=True) - subprocess.run(cmd, env=env, cwd=action_dir, check=True) + exec_dir = action_dir + if "cwd" in action_desc: + exec_dir = os.path.join(action_dir, action_desc["cwd"]) + subprocess.run(cmd, env=env, cwd=exec_dir, check=True) return action_dir -- cgit v1.2.3