Skip to content

Commit

Permalink
fix(cli): handle case when no copier configuration is found.
Browse files Browse the repository at this point in the history
  • Loading branch information
entelecheia committed Jun 16, 2023
1 parent 6e53aa6 commit beebfdc
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions src/hyfi/__cli__.py
Original file line number Diff line number Diff line change
Expand Up @@ -41,8 +41,10 @@ def run_copy(**args):
Copy all config files to the current working directory.
This is a wrapper around HyfiConfig to allow us to pass arguments to it.
"""
cfg = HyfiConfig(**args)
cfg = HyFI.to_dict(cfg.copier)
if "copier" not in args:
raise ValueError("No copier configuration found")
cfg = HyFI.to_dict(args["copier"])
print(type(cfg), cfg)
with Copier(**cfg) as worker:
worker.run_copy()

Expand Down

0 comments on commit beebfdc

Please sign in to comment.