jdx/mise · error
cannot be used with a bootstrap subcommand
Error message
{flag} cannot be used with a bootstrap subcommand What it means
`mise bootstrap` rejects combining --from/--adopt with a bootstrap subcommand: the flag selects a repository to run against, while subcommands operate inside an already-configured bootstrap repo, so both at once is ambiguous and the run method bails before any work.
Solutions
- Drop --adopt/--from when using a subcommand.
- If you want the from/adopt mode, omit the subcommand: `mise bootstrap --from <url>`.
- Consult `mise bootstrap --help` to see which invocation form each flag belongs to.
Example fix
// before mise bootstrap pull --from https://github.com/me/dotfiles // after mise bootstrap pull
Defensive patterns
Strategy: validation
Validate before calling
case "$*" in *--adopt*|*--from*) if has_subcommand; then echo "drop --adopt/--from with subcommands";; esac
Prevention
- Read `mise bootstrap --help` to learn flag/subcommand pairing.
- Keep one-shot bootstrap and subcommand forms separate in scripts.
- Shell-complete subcommands to avoid mixing forms.
When it happens
Trigger: Running e.g. `mise bootstrap status --adopt x` or `mise bootstrap pull --from <url>` — a subcommand is present and one of the conflicting flags is set.
Common situations: Copy-pasting the one-shot `mise bootstrap --from <url>` invocation while also naming a subcommand.
Understand the failure class
Background: "mutually exclusive" flag errors: what "can't supply both nx and xx", "--raw is not compatible with -i" and "cannot be used with" mean, and how to fix them — this error's family across 29 libraries.
Related errors
- a repository preview directory requires a dry run
- --changed does not accept target arguments
- choose --github-relay-repo OWNER/REPO or…
- `mise lock --upgrade` cannot be combined with tool arguments
- `--mode track` tracks a file where it is and takes no…
AI-assisted analysis of jdx/mise@533346cc37 (2026-09-17).
Data as JSON: /api/errors/6a535a802ebe8393.
Report an issue: GitHub.
Appendix: source
Thrown at src/cli/bootstrap.rs:1256
self.dry_run |= dry_run;
self.yes |= yes;
}
#[cfg(test)]
pub(super) fn inherited_root_flags(&self) -> (bool, bool) {
(self.dry_run, self.yes)
}
pub(crate) async fn run(mut self) -> Result<()> {
normalize_adopt_alias(&mut self.adopt, self.from_git.take());
if self.from.is_some() || self.adopt.is_some() {
if self.command.is_some() {
let flag = if self.adopt.is_some() {
"--adopt"
} else {
"--from"
};
bail!("{flag} cannot be used with a bootstrap subcommand");
}
return self.run_from().await;
}
if let Some(command) = self.command.take() {
return command.run().await;
}
let generation = OperationScope::begin("bootstrap", self.dry_run).await?;
let result = self.run_phases().await;
generation.refresh_tracked().await;
let error = result.as_ref().err().map(|err| format!("{err:#}"));
generation.finish(error, result.as_ref().ok().cloned());
// a complete run applied the declarations that arrived through
// sync; a declined, partial, or dry run did not
if let Ok(summary) = &result
&& !self.dry_run
&& !is_declined(summary)
&& self.only.is_empty()
&& self.skip.is_empty()View on GitHub (pinned to 533346cc37)