Skip to content

Commit

Permalink
fix: fix shell generation panic due to unnecessary 'conflicts_with' (a…
Browse files Browse the repository at this point in the history
  • Loading branch information
zilayo authored Oct 26, 2024
1 parent f8b3375 commit 10bebfa
Show file tree
Hide file tree
Showing 2 changed files with 22 additions and 1 deletion.
21 changes: 21 additions & 0 deletions cli/src/cli.rs
Original file line number Diff line number Diff line change
Expand Up @@ -2727,4 +2727,25 @@ mod tests {
}
);
}

#[test]
fn test_cli_completions() {
let mut clap_app = get_clap_app("test", "desc", "version");

let shells = [
Shell::Bash,
Shell::Fish,
Shell::Zsh,
Shell::PowerShell,
Shell::Elvish,
];

for shell in shells {
let mut buf: Vec<u8> = vec![];

clap_app.gen_completions_to("solana", shell, &mut buf);

assert!(!buf.is_empty());
}
}
}
2 changes: 1 addition & 1 deletion cli/src/program_v4.rs
Original file line number Diff line number Diff line change
Expand Up @@ -278,7 +278,7 @@ impl ProgramV4SubCommands for App<'_, '_> {
Arg::with_name("all")
.long("all")
.conflicts_with("account")
.conflicts_with("buffer_authority")
.conflicts_with("authority")
.help("Show accounts for all authorities"),
)
.arg(pubkey!(
Expand Down

0 comments on commit 10bebfa

Please sign in to comment.