Skip to content

Commit e09daa0

Browse files
committed
Update cli.py
1 parent 8450734 commit e09daa0

File tree

1 file changed

+6
-3
lines changed

1 file changed

+6
-3
lines changed

cubids/cli.py

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -31,9 +31,12 @@ def _path_exists(path, parser):
3131
pathlib.Path
3232
Absolute path to the given location.
3333
"""
34-
if path is None or not Path(path).exists():
35-
raise parser.error(f"Path does not exist: <{path}>.")
36-
return Path(path).absolute()
34+
if path is not None:
35+
path = Path(path)
36+
37+
if path is None or not path.exists():
38+
raise parser.error(f"Path does not exist: <{path.absolute()}>.")
39+
return path.absolute()
3740

3841

3942
def _is_file(path, parser):

0 commit comments

Comments
 (0)