Skip to content

Commit

Permalink
completion: silent errors on completion version mismatch
Browse files Browse the repository at this point in the history
  • Loading branch information
pacak committed Feb 3, 2024
1 parent 52ad20b commit fc7829a
Showing 1 changed file with 9 additions and 2 deletions.
11 changes: 9 additions & 2 deletions src/complete_gen.rs
Original file line number Diff line number Diff line change
Expand Up @@ -413,8 +413,15 @@ impl State {
8 => render_bash(&items, &shell, full_lit),
9 => render_fish(&items, &shell, full_lit, self.path[0].as_str()),
unk => {
eprintln!("Unsupported output revision {}, you need to genenerate your shell completion files for the app", unk);
std::process::exit(1);
#[cfg(debug_assertions)]
{
eprintln!("Unsupported output revision {}, you need to genenerate your shell completion files for the app", unk);
std::process::exit(1);
}
#[cfg(not(debug_assertions))]
{
std::process::exit(0);
}
}
}.unwrap())
}
Expand Down

0 comments on commit fc7829a

Please sign in to comment.