{"record":{"id":"6a535a802ebe8393","repo":"jdx/mise","slug":"flag-cannot-be-used-with-a-bootstrap-subcommand","errorCode":null,"errorMessage":"{flag} cannot be used with a bootstrap subcommand","messagePattern":"(.+?) cannot be used with a bootstrap subcommand","errorType":"validation","errorClass":null,"httpStatus":null,"severity":"error","filePath":"src/cli/bootstrap.rs","lineNumber":1256,"sourceCode":"        self.dry_run |= dry_run;\n        self.yes |= yes;\n    }\n\n    #[cfg(test)]\n    pub(super) fn inherited_root_flags(&self) -> (bool, bool) {\n        (self.dry_run, self.yes)\n    }\n\n    pub(crate) async fn run(mut self) -> Result<()> {\n        normalize_adopt_alias(&mut self.adopt, self.from_git.take());\n        if self.from.is_some() || self.adopt.is_some() {\n            if self.command.is_some() {\n                let flag = if self.adopt.is_some() {\n                    \"--adopt\"\n                } else {\n                    \"--from\"\n                };\n                bail!(\"{flag} cannot be used with a bootstrap subcommand\");\n            }\n            return self.run_from().await;\n        }\n        if let Some(command) = self.command.take() {\n            return command.run().await;\n        }\n        let generation = OperationScope::begin(\"bootstrap\", self.dry_run).await?;\n        let result = self.run_phases().await;\n        generation.refresh_tracked().await;\n        let error = result.as_ref().err().map(|err| format!(\"{err:#}\"));\n        generation.finish(error, result.as_ref().ok().cloned());\n        // a complete run applied the declarations that arrived through\n        // sync; a declined, partial, or dry run did not\n        if let Ok(summary) = &result\n            && !self.dry_run\n            && !is_declined(summary)\n            && self.only.is_empty()\n            && self.skip.is_empty()","sourceCodeStart":1238,"sourceCodeEnd":1274,"githubUrl":"https://github.com/jdx/mise/blob/533346cc374382b41ec5ff70536252b2e96e725c/src/cli/bootstrap.rs#L1238-L1274","documentation":"`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.","triggerScenarios":"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.","commonSituations":"Copy-pasting the one-shot `mise bootstrap --from <url>` invocation while also naming a subcommand.","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."],"exampleFix":"// before\nmise bootstrap pull --from https://github.com/me/dotfiles\n// after\nmise bootstrap pull","handlingStrategy":"validation","validationCode":"case \"$*\" in *--adopt*|*--from*) if has_subcommand; then echo \"drop --adopt/--from with subcommands\";; esac","typeGuard":null,"tryCatchPattern":null,"preventionTips":["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."],"tags":["cli","flags"],"backgroundTag":"mutually-exclusive-flags","analyzedSha":"533346cc374382b41ec5ff70536252b2e96e725c","analyzedAt":"2026-09-17T13:35:38.149Z","contentChangedAt":"2026-09-17T13:35:38.149Z","schemaVersion":2},"datasetVersion":"2026-09-23T08:17:48.524Z"}