From fc7829a5c54d942606946999a729ab3144e3eb84 Mon Sep 17 00:00:00 2001 From: Michael Baikov Date: Sat, 3 Feb 2024 09:03:29 -0500 Subject: [PATCH] completion: silent errors on completion version mismatch --- src/complete_gen.rs | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/src/complete_gen.rs b/src/complete_gen.rs index db386c2b..d75db705 100644 --- a/src/complete_gen.rs +++ b/src/complete_gen.rs @@ -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()) }