diff options
-rwxr-xr-x | bin/bootstrap-traverser.py | 5 | ||||
-rwxr-xr-x | bin/parallel-bootstrap-traverser.py | 5 |
2 files changed, 8 insertions, 2 deletions
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 diff --git a/bin/parallel-bootstrap-traverser.py b/bin/parallel-bootstrap-traverser.py index a6c64643..ee5bb194 100755 --- a/bin/parallel-bootstrap-traverser.py +++ b/bin/parallel-bootstrap-traverser.py @@ -313,7 +313,10 @@ def run_action(action_id: str, *, config: Json, root: str, graph: Json, 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) vals = g_CALLBACKS_PER_ID.fetch_clear(f"ACTION/{action_id}") if vals: for cb in vals: # mark ready |