From 761c85d5bfc67caae6fa20036b482e46d2a5972e Mon Sep 17 00:00:00 2001 From: Andrew Lilley Brinker Date: Tue, 7 May 2024 11:29:09 -0700 Subject: [PATCH] fix: Fix double-version command in `xtask` This commit fixes a runtime error that was stopping `cargo xtask` from running at all. Basically, we define a custom `--version` command, which was conflicting with the one automatically generated by `clap`, resulting in a runtime failure. This command just adds a line telling `clap` not to generate its own `version` flag, resolving the error and allowing `xtask` to run as expected. Signed-off-by: Andrew Lilley Brinker --- .cargo/config.toml | 8 +------- xtask/src/main.rs | 1 + 2 files changed, 2 insertions(+), 7 deletions(-) diff --git a/.cargo/config.toml b/.cargo/config.toml index 40aea3e3..4f520f28 100644 --- a/.cargo/config.toml +++ b/.cargo/config.toml @@ -1,12 +1,6 @@ [alias] -xtask = "run --package xtask --bin xtask --quiet --" +xtask = "run --package xtask --bin xtask --" [build] target-dir = ".target" incremental = true - -[profile.dev] -# Disabling debug info speeds up builds a bunch, -# and we don't rely on it for debugging that much. -debug = 0 - diff --git a/xtask/src/main.rs b/xtask/src/main.rs index 0553647a..d3f16d35 100644 --- a/xtask/src/main.rs +++ b/xtask/src/main.rs @@ -20,6 +20,7 @@ fn main() { let matches = Command::new("xtask") .about("Hipcheck development task runner.") .version(crate_version!()) + .disable_version_flag(true) .arg( Arg::new("help") .short('h')