diff options
| author | Markus Pettersson <markus.pettersson@mullvad.net> | 2024-01-22 14:09:48 +0100 |
|---|---|---|
| committer | Markus Pettersson <markus.pettersson@mullvad.net> | 2024-01-22 14:09:48 +0100 |
| commit | 7b48518df4ff020a1abac1b7c21745eea4468514 (patch) | |
| tree | 5001e6e95c85e5552e613e20d0b8a66ee2fa1d4c /mullvad-cli/src | |
| parent | f5f04e43501599554978bc236371407a1a5c899c (diff) | |
| parent | 2c6f04abdb3dc8c302ef6e9a048657b1e147ab29 (diff) | |
| download | mullvadvpn-7b48518df4ff020a1abac1b7c21745eea4468514.tar.xz mullvadvpn-7b48518df4ff020a1abac1b7c21745eea4468514.zip | |
Merge branch 'bash_completions'
Diffstat (limited to 'mullvad-cli/src')
| -rw-r--r-- | mullvad-cli/src/main.rs | 5 |
1 files changed, 2 insertions, 3 deletions
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(()) } } |
