Skip to content

Commit

Permalink
fix: Fix conflicts_with settings in config command
Browse files Browse the repository at this point in the history
Clap 4 requires the conflicting arg name to the Rust name, instead of
the user-visible arg name.
  • Loading branch information
theduke committed May 12, 2023
1 parent c06f481 commit 91a8b65
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 13 deletions.
12 changes: 6 additions & 6 deletions lib/cli-compiler/src/commands/config.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
14 changes: 7 additions & 7 deletions lib/cli/src/commands/config.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 91a8b65

Please sign in to comment.