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

Wolfgang Bumiller w.bumiller at proxmox.com
Tue Apr 15 08:00:14 CEST 2025


applied, but replaced the link with the usual inline commit reference,
since it's in the same repository

On Mon, Apr 14, 2025 at 05:09:29PM +0200, Maximiliano Sandoval wrote:
> 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