From 91a8b65294d36dea0bf30c3448a3fbac07dbb59e Mon Sep 17 00:00:00 2001 From: Christoph Herzog Date: Thu, 11 May 2023 15:00:16 +0200 Subject: [PATCH] fix: Fix conflicts_with settings in config command Clap 4 requires the conflicting arg name to the Rust name, instead of the user-visible arg name. --- lib/cli-compiler/src/commands/config.rs | 12 ++++++------ lib/cli/src/commands/config.rs | 14 +++++++------- 2 files changed, 13 insertions(+), 13 deletions(-) diff --git a/lib/cli-compiler/src/commands/config.rs b/lib/cli-compiler/src/commands/config.rs index 2137f6e0caa..0826e94212f 100644 --- a/lib/cli-compiler/src/commands/config.rs +++ b/lib/cli-compiler/src/commands/config.rs @@ -8,27 +8,27 @@ use std::path::PathBuf; /// The options for the `wasmer config` subcommand pub struct Config { /// Print the installation prefix. - #[clap(long, conflicts_with = "pkg-config")] + #[clap(long, conflicts_with = "pkg_config")] prefix: bool, /// Directory containing Wasmer executables. - #[clap(long, conflicts_with = "pkg-config")] + #[clap(long, conflicts_with = "pkg_config")] bindir: bool, /// Directory containing Wasmer headers. - #[clap(long, conflicts_with = "pkg-config")] + #[clap(long, conflicts_with = "pkg_config")] includedir: bool, /// Directory containing Wasmer libraries. - #[clap(long, conflicts_with = "pkg-config")] + #[clap(long, conflicts_with = "pkg_config")] libdir: bool, /// Libraries needed to link against Wasmer components. - #[clap(long, conflicts_with = "pkg-config")] + #[clap(long, conflicts_with = "pkg_config")] libs: bool, /// C compiler flags for files that include Wasmer headers. - #[clap(long, conflicts_with = "pkg-config")] + #[clap(long, conflicts_with = "pkg_config")] cflags: bool, /// It outputs the necessary details for compiling diff --git a/lib/cli/src/commands/config.rs b/lib/cli/src/commands/config.rs index 6867acd21d0..70b701448b9 100644 --- a/lib/cli/src/commands/config.rs +++ b/lib/cli/src/commands/config.rs @@ -20,31 +20,31 @@ pub struct Config { #[derive(Debug, Parser)] pub struct Flags { /// Print the installation prefix. - #[clap(long, conflicts_with = "pkg-config")] + #[clap(long, conflicts_with = "pkg_config")] prefix: bool, /// Directory containing Wasmer executables. - #[clap(long, conflicts_with = "pkg-config")] + #[clap(long, conflicts_with = "pkg_config")] bindir: bool, /// Directory containing Wasmer headers. - #[clap(long, conflicts_with = "pkg-config")] + #[clap(long, conflicts_with = "pkg_config")] includedir: bool, /// Directory containing Wasmer libraries. - #[clap(long, conflicts_with = "pkg-config")] + #[clap(long, conflicts_with = "pkg_config")] libdir: bool, /// Libraries needed to link against Wasmer components. - #[clap(long, conflicts_with = "pkg-config")] + #[clap(long, conflicts_with = "pkg_config")] libs: bool, /// C compiler flags for files that include Wasmer headers. - #[clap(long, conflicts_with = "pkg-config")] + #[clap(long, conflicts_with = "pkg_config")] cflags: bool, /// Print the path to the wasmer configuration file where all settings are stored - #[clap(long, conflicts_with = "pkg-config")] + #[clap(long, conflicts_with = "pkg_config")] config_path: bool, /// Outputs the necessary details for compiling