From: "Fabian Grünbichler" <f.gruenbichler@proxmox.com>
To: pbs-devel@lists.proxmox.com
Subject: [pbs-devel] [PATCH proxmox-backup 4/4] client: use stderr for all fingerprint confirm msgs
Date: Mon, 10 May 2021 10:52:34 +0200 [thread overview]
Message-ID: <20210510085234.775062-4-f.gruenbichler@proxmox.com> (raw)
In-Reply-To: <20210510085234.775062-1-f.gruenbichler@proxmox.com>
an interactive client might still want machine-readable output on
stdout.
Signed-off-by: Fabian Grünbichler <f.gruenbichler@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
next prev parent reply other threads:[~2021-05-10 8:52 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-05-10 8:52 [pbs-devel] [PATCH proxmox-backup 1/4] fix #3391: improve mismatched fingerprint handling Fabian Grünbichler
2021-05-10 8:52 ` [pbs-devel] [PATCH proxmox-backup 2/4] client: improve fingerprint variable names Fabian Grünbichler
2021-05-10 8:52 ` [pbs-devel] [PATCH proxmox-backup 3/4] client: refactor verification callback Fabian Grünbichler
2021-05-10 8:52 ` Fabian Grünbichler [this message]
2021-05-11 11:14 ` [pbs-devel] applied-series: [PATCH proxmox-backup 1/4] fix #3391: improve mismatched fingerprint handling Thomas Lamprecht
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20210510085234.775062-4-f.gruenbichler@proxmox.com \
--to=f.gruenbichler@proxmox.com \
--cc=pbs-devel@lists.proxmox.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox