From e81f45da5db7617a6f2ec0e88a8e0a4f83ab9cba Mon Sep 17 00:00:00 2001 From: Nick Petrovic <4001122+nickpetrovic@users.noreply.github.com> Date: Thu, 9 Jan 2025 10:47:49 -0500 Subject: [PATCH] cli validation --- sdk/src/beta9/cli/volume.py | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/sdk/src/beta9/cli/volume.py b/sdk/src/beta9/cli/volume.py index a90725a35..bb493a267 100644 --- a/sdk/src/beta9/cli/volume.py +++ b/sdk/src/beta9/cli/volume.py @@ -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)