Skip to content

Commit

Permalink
tools/mpremote: Don't be verbose when using cat command.
Browse files Browse the repository at this point in the history
Fixes issue #8828.

Signed-off-by: Damien George <damien@micropython.org>
  • Loading branch information
dpgeorge committed Jul 8, 2022
1 parent 7e5137e commit 80bc9b3
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion tools/mpremote/mpremote/main.py
Expand Up @@ -308,6 +308,9 @@ def _list_recursive(files, path):
else:
files.append(os.path.split(path))

# Don't be verbose when using cat, so output can be redirected to something.
verbose = args[0] != "cat"

if args[0] == "cp" and args[1] == "-r":
args.pop(0)
args.pop(0)
Expand All @@ -329,9 +332,10 @@ def _list_recursive(files, path):
pyb,
["cp", "/".join((dir, file)), ":" + dir + "/"],
progress_callback=show_progress_bar,
verbose=verbose,
)
else:
pyboard.filesystem_command(pyb, args, progress_callback=show_progress_bar)
pyboard.filesystem_command(pyb, args, progress_callback=show_progress_bar, verbose=verbose)
args.clear()


Expand Down

0 comments on commit 80bc9b3

Please sign in to comment.