Skip to content

Commit

Permalink
CLI write_config fix
Browse files Browse the repository at this point in the history
Will test whether the output path is a directory before appending a file name.
  • Loading branch information
benknoll-umn committed Aug 18, 2022
1 parent 12ddb00 commit bd66d35
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion python/biomedicus/cli.py
Original file line number Diff line number Diff line change
Expand Up @@ -119,7 +119,11 @@ def write_config(conf):
config_path = conf.files[conf.config]
name = Path(config_path).name
if conf.path is not None:
output_path = str(Path(conf.path) / name)
output_path = Path(conf.path)
if output_path.is_dir():
output_path = str(output_path / name)
else:
output_path = str(output_path)
else:
output_path = str(Path.cwd() / name)

Expand Down

0 comments on commit bd66d35

Please sign in to comment.