Skip to content

Commit

Permalink
cli validation
Browse files Browse the repository at this point in the history
  • Loading branch information
nickpetrovic committed Jan 9, 2025
1 parent a992593 commit e81f45d
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions sdk/src/beta9/cli/volume.py
Original file line number Diff line number Diff line change
Expand Up @@ -250,6 +250,12 @@ def cp(
if version == "v1":
return cp_v1(service, source, destination) # type: ignore

if isinstance(source, Path) and isinstance(destination, Path):
return terminal.error("Source and destination cannot both be local paths.")
if isinstance(source, RemotePath) and isinstance(destination, RemotePath):
# TODO: Implement remote to remote copy
return terminal.error("Source and destination cannot both be remote paths.")

try:
with StyledProgress() as p:
multipart.copy(source, destination, service=service.volume, progress=p)
Expand Down

0 comments on commit e81f45d

Please sign in to comment.