Skip to content

Commit

Permalink
feat(cli): check destination directory
Browse files Browse the repository at this point in the history
  • Loading branch information
jaxvanyang committed Jun 7, 2024
1 parent 9042c81 commit 49f689f
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions src/batchlink/cli.py
Original file line number Diff line number Diff line change
Expand Up @@ -101,6 +101,10 @@ def main(args: list[str] | None = None) -> int: # pylint: disable=C0116

args = make_parser().parse_args(args)

if not args.dest.is_dir():
print(f"FileNotFoundError: [Erroro 2] No such directory: {args.dest}")
return 2

src_files = sorted(
file.relative_to(args.src) for file in args.src.glob(args.input_pattern)
)
Expand Down

0 comments on commit 49f689f

Please sign in to comment.