[pbs-devel] [PATCH proxmox-backup 4/4] client: use stderr for all fingerprint confirm msgs
Fabian Grünbichler
f.gruenbichler at proxmox.com
Mon May 10 10:52:34 CEST 2021
an interactive client might still want machine-readable output on
stdout.
Signed-off-by: Fabian Grünbichler <f.gruenbichler at proxmox.com>
---
src/client/http_client.rs | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/client/http_client.rs b/src/client/http_client.rs
index 5ba82468..7fe33bcc 100644
--- a/src/client/http_client.rs
+++ b/src/client/http_client.rs
@@ -516,9 +516,9 @@ impl HttpClient {
// If we're on a TTY, query the user
if interactive && tty::stdin_isatty() {
- println!("fingerprint: {}", fp_string);
+ eprintln!("fingerprint: {}", fp_string);
loop {
- print!("Are you sure you want to continue connecting? (y/n): ");
+ eprint!("Are you sure you want to continue connecting? (y/n): ");
let _ = std::io::stdout().flush();
use std::io::{BufRead, BufReader};
let mut line = String::new();
--
2.20.1
More information about the pbs-devel
mailing list