diff --git a/tools/Cargo.toml b/tools/Cargo.toml index 8f940fe6179..7e170c33c6c 100644 --- a/tools/Cargo.toml +++ b/tools/Cargo.toml @@ -9,7 +9,7 @@ anyhow = "1.0" thiserror = "1.0" serde = { version = "1.0.137", features = ["derive"] } toml = "0.5.9" -clap = "3.2.10" +clap = "4.0.10" ansi_term = "0.12.1" [[bin]] diff --git a/tools/bin/cargo-elf2sgxs.rs b/tools/bin/cargo-elf2sgxs.rs index bc105c4d869..adc47021cb6 100644 --- a/tools/bin/cargo-elf2sgxs.rs +++ b/tools/bin/cargo-elf2sgxs.rs @@ -50,6 +50,7 @@ fn real_main() -> Result<()> { clap::Command::new("elf2sgxs").arg( Arg::new("release") .long("release") + .action(clap::ArgAction::SetTrue) .help("Use release build artifacts"), ), ) @@ -73,7 +74,7 @@ fn real_main() -> Result<()> { // Build target directory. let mut target_path = package_root.target_path(); target_path.push(TARGET_TRIPLE); - if matches.is_present("release") { + if matches.get_flag("release") { target_path.push("release"); } else { target_path.push("debug");