diff options
author | Jim Mussared <jim.mussared@gmail.com> | 2023-05-31 11:16:34 +1000 |
---|---|---|
committer | Damien George <damien@micropython.org> | 2023-06-02 16:16:24 +1000 |
commit | b6b19798c21f8d8da6230c2c588a74997a71a853 (patch) | |
tree | 5deb8b5f965fdc8c13a703f2d2568776de26777a | |
parent | 46715e370d3f283fcc2683f05e7898d54a66b59c (diff) | |
download | micropython-b6b19798c21f8d8da6230c2c588a74997a71a853.tar.gz micropython-b6b19798c21f8d8da6230c2c588a74997a71a853.zip |
tools/mpremote: Handle `cp` without destination.
This work was funded through GitHub Sponsors.
Signed-off-by: Jim Mussared <jim.mussared@gmail.com>
-rwxr-xr-x | tools/pyboard.py | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/tools/pyboard.py b/tools/pyboard.py index 7b546b99d1..0ce2d291e6 100755 --- a/tools/pyboard.py +++ b/tools/pyboard.py @@ -686,6 +686,10 @@ def filesystem_command(pyb, args, progress_callback=None, verbose=False): args = args[1:] try: if cmd == "cp": + if len(args) == 1: + raise PyboardError( + "cp: missing destination file operand after '{}'".format(args[0]) + ) srcs = args[:-1] dest = args[-1] if dest.startswith(":"): |