[pbs-devel] [PATCH proxmox] router: format: add newline at the end

Maximiliano Sandoval m.sandoval at proxmox.com
Mon Apr 14 17:09:29 CEST 2025


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 at 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





More information about the pbs-devel mailing list