From 85f4e834d86d02ce4ca266f724a205a1644acd73 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fabian=20Gr=C3=BCnbichler?= Date: Mon, 10 May 2021 10:52:34 +0200 Subject: [PATCH] client: use stderr for all fingerprint confirm msgs MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit an interactive client might still want machine-readable output on stdout. Signed-off-by: Fabian Grünbichler --- 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();