mirror of
https://github.com/netinvent/npbackup.git
synced 2025-11-10 06:01:39 +08:00
CLI: dump should output binary data straight to stdout
This commit is contained in:
parent
b206ba9acf
commit
77b1ce4e20
1 changed files with 3 additions and 0 deletions
|
|
@ -1379,6 +1379,9 @@ class ResticRunner:
|
|||
# Also, don't use poller method which is too slow
|
||||
result, output = self.executor(cmd, encoding=False, method="monitor")
|
||||
if result:
|
||||
# We need to write binary data directly to stdout on success
|
||||
# Dump should only be used by CLI
|
||||
sys.stdout.buffer.write(output)
|
||||
msg = f"File {path} successfully dumped"
|
||||
else:
|
||||
msg = f"Cannot dump file {path}:\n {output}"
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue