Pass overrides to subcommands in workflows (#9059)

* Pass overrides to subcommands in workflows

* Add missing docstring
This commit is contained in:
Adriane Boyd 2021-08-30 09:23:54 +02:00 committed by GitHub
parent 6ff8d90070
commit 1e9b4b55ee
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -57,6 +57,7 @@ def project_run(
project_dir (Path): Path to project directory.
subcommand (str): Name of command to run.
overrides (Dict[str, Any]): Optional config overrides.
force (bool): Force re-running, even if nothing changed.
dry (bool): Perform a dry run and don't execute commands.
capture (bool): Whether to capture the output and errors of individual commands.
@ -72,7 +73,7 @@ def project_run(
if subcommand in workflows:
msg.info(f"Running workflow '{subcommand}'")
for cmd in workflows[subcommand]:
project_run(project_dir, cmd, force=force, dry=dry, capture=capture)
project_run(project_dir, cmd, overrides=overrides, force=force, dry=dry, capture=capture)
else:
cmd = commands[subcommand]
for dep in cmd.get("deps", []):