From 5f07dd1f6b3179bb31b75bbe538dcfddca548853 Mon Sep 17 00:00:00 2001 From: Julien Cretin Date: Fri, 20 Sep 2024 14:56:28 +0200 Subject: [PATCH] Fix CLI name in --version (#704) The default is the package name which is `magika-cli`. We want to use the binary name which is `magika`. Feature request on `clap` side: https://github.com/clap-rs/clap/issues/5738. --- rust/cli/CHANGELOG.md | 1 + rust/cli/src/main.rs | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/rust/cli/CHANGELOG.md b/rust/cli/CHANGELOG.md index d104883a..bd20b837 100644 --- a/rust/cli/CHANGELOG.md +++ b/rust/cli/CHANGELOG.md @@ -9,6 +9,7 @@ ### Patch +- Fix the `--version` binary name from `magika-cli` to `magika` - Make sure ONNX Runtime telemetry is disabled - Change the default of the hidden flag `--num-tasks` from 1 to the number of CPUs diff --git a/rust/cli/src/main.rs b/rust/cli/src/main.rs index 3577398d..53210b5b 100644 --- a/rust/cli/src/main.rs +++ b/rust/cli/src/main.rs @@ -30,7 +30,7 @@ use tokio::io::AsyncReadExt; /// Determines the content type of files with deep-learning. #[derive(Parser)] -#[command(version = Version, arg_required_else_help = true)] +#[command(name = "magika", version = Version, arg_required_else_help = true)] struct Flags { /// List of paths to the files to analyze. ///