From: Wolfgang Bumiller <w.bumiller@proxmox.com>
To: Filip Schauer <f.schauer@proxmox.com>
Cc: pbs-devel@lists.proxmox.com
Subject: [pbs-devel] applied: [PATCH vma-to-pbs] Add missing implementation of the --version option
Date: Thu, 6 Feb 2025 15:28:26 +0100 [thread overview]
Message-ID: <pydgkyyyw25wnnpophlhtsc3d4m4kd47odwlzfe2hcacbsqvaj@ou26bjh6jifc> (raw)
In-Reply-To: <20241126131751.86049-1-f.schauer@proxmox.com>
applied, but added the binary name to the output
On Tue, Nov 26, 2024 at 02:17:51PM +0100, Filip Schauer wrote:
> This was left in the help text but was not implemented during the
> transition from clap to picoargs in 80fb0a4a.
>
> Signed-off-by: Filip Schauer <f.schauer@proxmox.com>
> ---
> src/main.rs | 6 ++++++
> 1 file changed, 6 insertions(+)
>
> diff --git a/src/main.rs b/src/main.rs
> index f942a73..4f6691e 100644
> --- a/src/main.rs
> +++ b/src/main.rs
> @@ -65,6 +65,7 @@ Options:
> -V, --version
> Print version
> ";
> +const VERSION: &str = env!("CARGO_PKG_VERSION");
>
> fn parse_args() -> Result<BackupVmaToPbsArgs, Error> {
> let mut args: Vec<_> = std::env::args_os().collect();
> @@ -74,6 +75,8 @@ fn parse_args() -> Result<BackupVmaToPbsArgs, Error> {
> let options = [
> "-h",
> "--help",
> + "-V",
> + "--version",
> "-c",
> "--compress",
> "-e",
> @@ -112,6 +115,9 @@ fn parse_args() -> Result<BackupVmaToPbsArgs, Error> {
> if args.contains(["-h", "--help"]) {
> print!("{CMD_HELP}");
> std::process::exit(0);
> + } else if args.contains(["-V", "--version"]) {
> + println!("Version: {VERSION}");
> + std::process::exit(0);
> }
>
> let pbs_repository = args.value_from_str("--repository")?;
> --
> 2.39.5
_______________________________________________
pbs-devel mailing list
pbs-devel@lists.proxmox.com
https://lists.proxmox.com/cgi-bin/mailman/listinfo/pbs-devel
prev parent reply other threads:[~2025-02-06 14:28 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-11-26 13:17 [pbs-devel] " Filip Schauer
2025-02-06 14:28 ` Wolfgang Bumiller [this message]
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=pydgkyyyw25wnnpophlhtsc3d4m4kd47odwlzfe2hcacbsqvaj@ou26bjh6jifc \
--to=w.bumiller@proxmox.com \
--cc=f.schauer@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