Skip to content

Commit

Permalink
fix(main): simplify project initialization in run_task command
Browse files Browse the repository at this point in the history
  • Loading branch information
entelecheia committed Mar 23, 2024
1 parent 441a0e2 commit eb00109
Showing 1 changed file with 3 additions and 4 deletions.
7 changes: 3 additions & 4 deletions src/hyfi/main/main.py
Original file line number Diff line number Diff line change
Expand Up @@ -425,11 +425,10 @@ def run_config(
workflow = HyFI.Workflow(**config)
HyFI.run_workflow(workflow, dryrun=dryrun)
elif cmd_name == "run_task":
project = (
HyFI.initialize(**config["project"]) if "project" in config else None
)
if "project" in config:
HyFI.initialize(**config["project"])
task = HyFI.Task(**config["task"])
HyFI.run_task(task, project=project, dryrun=dryrun)
HyFI.run_task(task, dryrun=dryrun)
elif cmd_name == "copy_conf":
copier_cfg = config["copier"]
copier_cfg["dryrun"] = dryrun
Expand Down

0 comments on commit eb00109

Please sign in to comment.