arqbackup / arq_restore

command-line utility for restoring from Arq backups
https://www.arqbackup.com
649 stars 129 forks source link

Prompt for encryption password should be on stderr, not stdout #36

Closed philipmw closed 7 years ago

philipmw commented 7 years ago

Redirecting stdout to a file is common for something like listtree, which can produce thousands of lines of text. But the program interactively prompts for an encryption password -- and if the output is redirected to a file, the prompt goes there also. The program appears to hang. Or maybe it's listing folders. You can't tell.

The standard solution is to redirect the prompt to stderr, so that it remains visible even if stdout is redirected to a file.

arqbackup commented 7 years ago

Changed the code to prompt via stderr in commit 105bb1e742790c2ca9029df656db41dfdd858487