Skip to content

Commit bd66d35

Browse files
committed
CLI write_config fix
Will test whether the output path is a directory before appending a file name.
1 parent 12ddb00 commit bd66d35

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

python/biomedicus/cli.py

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -119,7 +119,11 @@ def write_config(conf):
119119
config_path = conf.files[conf.config]
120120
name = Path(config_path).name
121121
if conf.path is not None:
122-
output_path = str(Path(conf.path) / name)
122+
output_path = Path(conf.path)
123+
if output_path.is_dir():
124+
output_path = str(output_path / name)
125+
else:
126+
output_path = str(output_path)
123127
else:
124128
output_path = str(Path.cwd() / name)
125129

0 commit comments

Comments
 (0)