{"record":{"id":"9b9f8caf6c4e75ed","repo":"jdx/mise","slug":"default-inline-shell-args-must-not-be-empty","errorCode":null,"errorMessage":"default inline shell args must not be empty","messagePattern":"default inline shell args must not be empty","errorType":"exception","errorClass":null,"httpStatus":null,"severity":"error","filePath":"src/system/hooks.rs","lineNumber":144,"sourceCode":"        }\n    }\n    Ok(out)\n}\n\npub(crate) async fn run_phase(\n    config: &Config,\n    hooks: &[BootstrapHook],\n    phase: BootstrapHookPhase,\n    dry_run: bool,\n) -> Result<()> {\n    let phase_hooks: Vec<_> = hooks.iter().filter(|hook| hook.phase == phase).collect();\n    if phase_hooks.is_empty() {\n        return Ok(());\n    }\n    info!(\"bootstrap: {phase} hooks\");\n    let shell = Settings::get().default_inline_shell()?;\n    let Some((program, shell_args)) = shell.split_first() else {\n        bail!(\"default inline shell args must not be empty\");\n    };\n    for hook in phase_hooks {\n        let run = if crate::tera::contains_template_syntax(&hook.run) {\n            let mut tera = if dry_run {\n                crate::tera::get_tera_for_dry_run(hook.config_path.parent())\n            } else {\n                crate::tera::get_tera(hook.config_path.parent())\n            };\n            let mut context = config.bootstrap_tera_ctx(&hook.config_path).clone();\n            if context.get(\"config_root\").is_none() {\n                let config_root =\n                    crate::config::config_file::config_root::config_root(&hook.config_path);\n                context.insert(\"config_root\", &config_root);\n            }\n            crate::tera::render_str(&mut tera, &hook.run, &context).map_err(|err| {\n                eyre::eyre!(\n                    \"[bootstrap.hooks.{phase}] in {}: failed to render template: {err}\",\n                    hook.config_path.display()","sourceCodeStart":126,"sourceCodeEnd":162,"githubUrl":"https://github.com/jdx/mise/blob/533346cc374382b41ec5ff70536252b2e96e725c/src/system/hooks.rs#L126-L162","documentation":"run_phase in src/system/hooks.rs resolves the configured default inline shell via Settings::get().default_inline_shell() and expects it as a non-empty [program, args...] vector. If the shell setting resolves to an empty vector (split_first returns None), it cannot spawn hooks and bails with this error. It is an internal/config invariant that the default inline shell has at least a program name.","triggerScenarios":"The default_inline_shell setting is set to an empty string or empty array so Settings::default_inline_shell() yields an empty vec; run_phase then tries to split_first() before launching phase hooks.","commonSituations":"Users setting default_inline_shell = \"\" or [] in global or project config to 'disable' the inline shell; broken settings migrations leaving the value empty; trimming whitespace-only values that become empty.","solutions":["Set default_inline_shell to a valid shell invocation, e.g. \"/bin/bash -c\" or \"sh -c\"","Remove the empty default_inline_shell setting to fall back to the platform default","Check global and project mise.toml/settings for an empty value and fix it"],"exampleFix":"# before\ndefault_inline_shell = \"\"\n# after\ndefault_inline_shell = \"/bin/bash -c\"","handlingStrategy":"validation","validationCode":"# ensure the inline shell setting is non-empty before running hooks\nshell = settings.get(\"default_inline_shell\")\nassert shell and shell.strip(), \"default_inline_shell must be a non-empty shell command\"","typeGuard":null,"tryCatchPattern":"match run_phase(...).await {\n    Err(e) if e.to_string().contains(\"default inline shell\") =>\n        eprintln!(\"fix default_inline_shell in settings; falling back to /bin/sh -c\"),\n    Err(e) => return Err(e),\n    Ok(v) => Ok(v),\n}","preventionTips":["Keep default_inline_shell set to a full '<shell> -c' invocation","Never blank a setting to disable it — remove the key instead","Validate settings after upgrades/migrations"],"tags":["config","shell","hooks"],"backgroundTag":"invalid-config-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"}