diff options
author | Klaus Aehlig <klaus.aehlig@huawei.com> | 2024-11-06 12:27:04 +0100 |
---|---|---|
committer | Klaus Aehlig <klaus.aehlig@huawei.com> | 2024-11-06 12:33:15 +0100 |
commit | 51ce2fe766ba189771b32a50be2e2592d64c9f4f (patch) | |
tree | 9ec8953921ab5587f9fe8de92d26e3af071f1c08 /bin/bootstrap-traverser.py | |
parent | 8694c2bf81f26d7865f79e755794c50a342b3f5d (diff) | |
download | justbuild-51ce2fe766ba189771b32a50be2e2592d64c9f4f.tar.gz |
Make bootstrap-traverser aware of the "cwd" property of actions
Diffstat (limited to 'bin/bootstrap-traverser.py')
-rwxr-xr-x | bin/bootstrap-traverser.py | 5 |
1 files changed, 4 insertions, 1 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 |