fix: clean exit when fallback channel is not found

Fixes #643
This commit is contained in:
alexandre pasmantier 2025-07-15 10:23:47 +02:00
parent 2ae95cdbb1
commit 37e31b2443

View File

@ -515,10 +515,7 @@ pub fn guess_channel_from_prompt(
debug!("Guessing channel from prompt: {}", prompt);
// git checkout -qf
// --- -------- --- <---------
let fallback = cable
.get(fallback_channel)
.expect("Fallback channel not found in cable channels")
.clone();
let fallback = cable.get_channel(fallback_channel);
if prompt.trim().is_empty() {
return fallback;
}