From bd66d35687ade0935fc421cdbeb90dd7ec77016c Mon Sep 17 00:00:00 2001 From: Ben Knoll Date: Thu, 18 Aug 2022 12:33:15 -0500 Subject: [PATCH] CLI write_config fix Will test whether the output path is a directory before appending a file name. --- python/biomedicus/cli.py | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/python/biomedicus/cli.py b/python/biomedicus/cli.py index 522e3a28..8a3afc54 100644 --- a/python/biomedicus/cli.py +++ b/python/biomedicus/cli.py @@ -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)