{"record":{"id":"c55bbbba8eea88d0","repo":"jdx/mise","slug":"bootstrap-plan-contains-resources-with-unknown-sta","errorCode":null,"errorMessage":"bootstrap plan contains resources with unknown state","messagePattern":"bootstrap plan contains resources with unknown state","errorType":"exception","errorClass":null,"httpStatus":null,"severity":"error","filePath":"src/cli/bootstrap.rs","lineNumber":2453,"sourceCode":"                        .origin\n                        .as_ref()\n                        .map(|origin| origin.config.display_user())\n                        .unwrap_or_default(),\n                ]);\n            }\n            table.print()?;\n            miseprintln!(\n                \"Plan: {} create, {} update, {} unchanged, {} remove, {} unknown\",\n                output.summary.create,\n                output.summary.update,\n                output.summary.unchanged,\n                output.summary.remove,\n                output.summary.unknown,\n            );\n        }\n        if self.detailed_exitcode {\n            if output.summary.has_unknown() {\n                bail!(\"bootstrap plan contains resources with unknown state\");\n            }\n            if output.summary.has_changes() {\n                return Err(crate::request_exit(2));\n            }\n        }\n        Ok(())\n    }\n}\n\nimpl BootstrapConfigRoots {\n    async fn run(self) -> Result<()> {\n        let config = Config::get().await?;\n        let roots = config\n            .selected_bootstrap_config_maps()\n            .map(|(config_root, config_files)| {\n                let mut environments = vec![];\n                let mut declares = BootstrapConfigRootDeclarations::default();\n                for cf in config_files.values().rev() {","sourceCodeStart":2435,"sourceCodeEnd":2471,"githubUrl":"https://github.com/jdx/mise/blob/533346cc374382b41ec5ff70536252b2e96e725c/src/cli/bootstrap.rs#L2435-L2471","documentation":"With `mise bootstrap --detailed-exitcode`, a plan whose resources have indeterminate ('unknown') state is treated as an error because mise cannot safely report whether changes would occur. This bail fires when output.summary.has_unknown() is true.","triggerScenarios":"Running `mise bootstrap --detailed-exitcode` (or `--plan --detailed-exitcode`) when the plan output contains resources whose state could not be determined (summary.unknown > 0).","commonSituations":"A hook or resource check failed to run (e.g. remote host unreachable, missing permissions) so its state is unknown; the user asked for exit-code semantics but got ambiguity.","solutions":["Rerun without --detailed-exitcode to see which resources are in an unknown state and why","Fix the underlying check failures (connectivity, permissions, missing tools) that leave resources unknown","Rerun bootstrap normally so state is refreshed, then retry with --detailed-exitcode"],"exampleFix":null,"handlingStrategy":"validation","validationCode":"if plan.summary.unknown > 0 { console.warn('unknown-state resources; fix before --detailed-exitcode') }","typeGuard":null,"tryCatchPattern":null,"preventionTips":["Run plain `mise bootstrap` (no --detailed-exitcode) in CI first to surface unknowns","Fix any failed resource checks before using detailed exit codes","Treat exit code 2 vs this error distinctly in scripts"],"tags":["cli","bootstrap","plan","exit-code"],"backgroundTag":"invalid-argument-value","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"}