Skip to content

Commit

Permalink
better error when download dest doesnt exist
Browse files Browse the repository at this point in the history
Signed-off-by: Ayush Kamat <[email protected]>
  • Loading branch information
ayushkamat committed Oct 26, 2023
1 parent 75e7f16 commit 3202f5d
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions latch_cli/services/cp/download.py
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,14 @@ def download(
dest: Path,
config: CPConfig,
):
if not dest.parent.exists():
click.secho(
f"Invalid copy destination {dest}. Parent directory {dest.parent} does not"
" exist.",
fg="red",
)
raise click.exceptions.Exit(1)

normalized = normalize_path(src)
data = get_node_data(src)

Expand Down

0 comments on commit 3202f5d

Please sign in to comment.