gitbutlerapp/gitbutler · error
the picker was configured to not allow multiple picks, yet…
Error message
the picker was configured to not allow multiple picks, yet multiple picks were returned
What it means
`prompt_select` drives the interactive picker in single-select mode; it asserts that the picker returns at most one pick. If the picker backend returns multiple picks despite being configured for single selection, this bail fires, indicating a broken contract with the picker.
Solutions
- Check the picker configuration: ensure multi-select is disabled end-to-end and the backend honors it
- If a custom/test picker is in use, make it return at most one pick
- Report a bug if the built-in picker emits multiple picks in single-select mode
Example fix
// custom picker before Ok(vec![a, b]) // after Ok(vec![a]) // single-select pickers must return at most one pick
Defensive patterns
Strategy: try-catch
Validate before calling
// when supplying a custom picker, assert its contract before use assert!(picker.max_selections() <= 1, "prompt_select requires a single-select picker");
Type guard
fn single_pick(picks: &[Pick]) -> Option<&Pick> { picks.get(0).filter(|_| picks.len() == 1) } Try / catch
let pick = match channel.prompt_select(prompt) {
Ok(p) => p,
Err(e) if e.to_string().contains("multiple picks") => return Err(anyhow!("picker misconfigured: single-select returned multiple picks")),
Err(e) => return Err(e),
}; Prevention
- Ensure the picker backend honors single-selection configuration
- Keep picker wrappers and the underlying prompt library versions in sync
- Cover single-select prompts with tests using a compliant mock picker
When it happens
Trigger: Calling `OutputChannel::prompt_select` (single-select helper) where the underlying picker returns a picks vector with more than one element — a picker-implementation or configuration bug, not a user-input error.
Common situations: Custom or mocked picker implementations returning multiple selections while `multiple` is disabled; version mismatches between the picker component and this wrapper.
Understand the failure class
Background: "This is a bug, please report it": internal invariant violations, unreachable panics, and SNH errors explained — this error's family across 47 libraries.
Related errors
- no searchable columns
- anchor is always present in the order at this point
- Change to discard at
- commits cannot be moved to the merge base
- Could not determine which forge provider to authenticate…
AI-assisted analysis of gitbutlerapp/gitbutler@58e5313667 (2026-09-18).
Data as JSON: /api/errors/89644facf0de3fb6.
Report an issue: GitHub.
Appendix: source
Thrown at crates/but/src/utils/output_channel.rs:514
let Some(picks) = tui::run_picker(
self,
prompt.as_ref(),
items,
PickerOptions {
allow_multiple: false,
default_selected: Vec::new(),
disabled: Vec::new(),
},
)?
else {
return Ok(None);
};
match &picks[..] {
[] => Ok(None),
[pick] => Ok(Some(pick)),
_ => {
anyhow::bail!(
"the picker was configured to not allow multiple picks, yet multiple picks were returned"
)
}
}
}
pub fn prompt_multi_select<'a, Key, Value>(
&mut self,
prompt: impl AsRef<str>,
items: &'a NonEmpty<(Key, Value)>,
) -> anyhow::Result<Option<Vec<&'a Value>>>
where
Key: std::fmt::Display,
{
tui::run_picker(
self,
prompt.as_ref(),
items,View on GitHub (pinned to 58e5313667)