jdx/mise · error
select one operation by its identifier before accepting…
Error message
select one operation by its identifier before accepting current files
What it means
`mise dot recover` with `--keep-current` (accepting current live files) or an operation selector requires exactly one matching pending operation. If more than one record matched, the intent is ambiguous, so it bails.
Solutions
- Pass the exact operation identifier: `mise dot recover <id> --keep-current`
- Resolve/recover pending operations one at a time until only one remains
- Run `mise dot history --pending` to see which operations are pending and pick one
- Drop --keep-current if you want a different bulk behavior (with confirmation)
Example fix
# before mise dot recover --keep-current # 3 pending ops # after mise dot recover 3f2a... --keep-current # select one by id
Defensive patterns
Strategy: validation
Validate before calling
pending=$(mise dot history --pending)
count=$(echo "$pending" | grep -c '^' )
if [ "$count" -gt 1 ] && [ -z "${OP_ID:-}" ]; then echo "select one operation id"; exit 1; fi Try / catch
if ! mise dot recover --keep-current 2>/dev/null; then
mise dot recover "$(mise dot history --pending | head -1 | awk '{print $1}')" --keep-current
fi Prevention
- Always pass the operation identifier when multiple ops may be pending
- Drain pending operations one at a time
- Don't combine --keep-current with ambiguous selectors
- Check `mise dot history --pending` count before bulk recovery
When it happens
Trigger: Running `mise dot recover --keep-current` (or with an operation id) when `selected.len() > 1` — the selector matched multiple pending operations or no selector was given but several are pending.
Common situations: Multiple interrupted operations pending after several failed runs; combining --keep-current with a pattern that matches several records; forgetting to pass the specific operation identifier.
Related errors
- no matching interrupted operation; `mise dot history…
- no matching interrupted operation; `mise bootstrap dotfiles…
- a glob is required
- `--all` needs `--to
- at least one target or --changed is required
AI-assisted analysis of jdx/mise@533346cc37 (2026-09-17).
Data as JSON: /api/errors/3195d67a86055709.
Report an issue: GitHub.
Appendix: source
Thrown at src/cli/dotfiles/recover.rs:77
}
for (_, record) in &selected {
miseprintln!("Interrupted operation {}", record.checkpoint.uuid);
if let Some(operation) = &record.checkpoint.operation {
let paths = operation
.journal
.iter()
.filter_map(|entry| match entry {
JournalEntry::PathChanged { path, .. } => Some(path),
_ => None,
})
.collect::<BTreeSet<_>>();
for path in paths {
miseprintln!(" {}", crate::file::display_path(path));
}
}
}
if selected.len() > 1 && (self.keep_current || self.operation.is_some()) {
bail!("select one operation by its identifier before accepting current files");
}
if self.keep_current
&& !self.yes
&& !crate::ui::prompt::confirm(
"Keep these live files and discard this operation's temporary recovery copies?",
)?
.is_yes()
{
info!("dotfiles: recovery copies preserved");
return Ok(());
}
for (_, record) in selected {
scope::recover_operation(&store, tracked, &record.checkpoint.uuid, self.keep_current)?;
if store::list_pending_in(store.state_dir())?
.iter()
.any(|(_, pending)| pending.checkpoint.uuid == record.checkpoint.uuid)
{
bail!(View on GitHub (pinned to 533346cc37)