diff options
Diffstat (limited to 'mullvad-cli')
| -rw-r--r-- | mullvad-cli/Cargo.toml | 2 | ||||
| -rw-r--r-- | mullvad-cli/src/main.rs | 5 |
2 files changed, 3 insertions, 4 deletions
diff --git a/mullvad-cli/Cargo.toml b/mullvad-cli/Cargo.toml index bd0bc56192..dbe287986d 100644 --- a/mullvad-cli/Cargo.toml +++ b/mullvad-cli/Cargo.toml @@ -31,7 +31,7 @@ mullvad-management-interface = { path = "../mullvad-management-interface" } tokio = { workspace = true, features = ["macros", "rt-multi-thread", "fs"] } [target.'cfg(all(unix, not(target_os = "android")))'.dependencies] -clap_complete = { version = "4.2.1" } +clap_complete = { version = "4.4.8" } [target.'cfg(windows)'.build-dependencies] winres = "0.1" diff --git a/mullvad-cli/src/main.rs b/mullvad-cli/src/main.rs index c0a8a8b992..0dd5d26dbe 100644 --- a/mullvad-cli/src/main.rs +++ b/mullvad-cli/src/main.rs @@ -1,5 +1,3 @@ -#[cfg(all(unix, not(target_os = "android")))] -use anyhow::anyhow; use anyhow::Result; use clap::Parser; @@ -182,12 +180,13 @@ async fn main() -> Result<()> { #[cfg(all(unix, not(target_os = "android")))] Cli::ShellCompletions { shell, dir } => { + use anyhow::Context; use clap::CommandFactory; // FIXME: The shell completions include hidden commands (including "shell-completions") println!("Generating shell completions to {}", dir.display()); clap_complete::generate_to(shell, &mut Cli::command(), BIN_NAME, dir) - .map_err(|_| anyhow!("Failed to generate shell completions"))?; + .context("Failed to generate shell completions")?; Ok(()) } } |
