public inbox for pbs-devel@lists.proxmox.com
 help / color / mirror / Atom feed
From: Maximiliano Sandoval <m.sandoval@proxmox.com>
To: pbs-devel@lists.proxmox.com
Subject: [pbs-devel] [PATCH proxmox] router: format: add newline at the end
Date: Mon, 14 Apr 2025 17:09:29 +0200	[thread overview]
Message-ID: <20250414150929.639930-1-m.sandoval@proxmox.com> (raw)

Without this newline running commands with missing arguments, e.g.
```
proxmox-backup-client backup
```

will print their usage string without a newline at the end, which is
costing me my sanity.

As per [1], usage shouldn't contain trailing new lines and this in
principle should not print double new lines.

[1] https://git.proxmox.com/?p=proxmox.git;a=commit;h=d872eb9d7ebadbd8fcc9506eb2c5689632fa89bc

Signed-off-by: Maximiliano Sandoval <m.sandoval@proxmox.com>
---
 proxmox-router/src/cli/format.rs | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/proxmox-router/src/cli/format.rs b/proxmox-router/src/cli/format.rs
index 95448aa9..e8ebe41f 100644
--- a/proxmox-router/src/cli/format.rs
+++ b/proxmox-router/src/cli/format.rs
@@ -279,7 +279,7 @@ pub(crate) fn print_simple_usage_error_do<'cli>(
         &[],
         global_options_iter,
     );
-    eprint!("Error: {}\nUsage: {}", err_msg, usage);
+    eprintln!("Error: {}\nUsage: {}", err_msg, usage);
 }
 
 /// Print command usage for nested commands to ``stderr``.
-- 
2.39.5



_______________________________________________
pbs-devel mailing list
pbs-devel@lists.proxmox.com
https://lists.proxmox.com/cgi-bin/mailman/listinfo/pbs-devel


             reply	other threads:[~2025-04-14 15:09 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-04-14 15:09 Maximiliano Sandoval [this message]
2025-04-15  6:00 ` [pbs-devel] applied: " Wolfgang Bumiller

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=20250414150929.639930-1-m.sandoval@proxmox.com \
    --to=m.sandoval@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
Service provided by Proxmox Server Solutions GmbH | Privacy | Legal