diff --git a/src/taskgraph/transforms/run/run_task.py b/src/taskgraph/transforms/run/run_task.py index 3ce894e39..56204112f 100644 --- a/src/taskgraph/transforms/run/run_task.py +++ b/src/taskgraph/transforms/run/run_task.py @@ -79,9 +79,12 @@ def common_setup(config, task, taskdesc, command): ) vcs_path = taskdesc["worker"]["env"]["VCS_PATH"] - for repo_config in repo_configs.values(): + + for repo_config, index in enumerate(repo_configs.values()): checkout_path = path.join(vcs_path, repo_config.path) command.append(f"--{repo_config.prefix}-checkout={checkout_path}") + if index == 0: + taskdesc["worker"]["env"].setdefault("PRIMARY_REPO_PATH", checkout_path) if run["sparse-profile"]: command.append(