jdx/mise · error

default inline shell args must not be empty

Error message

default inline shell args must not be empty

What it means

run_phase executes each hook through the settings-derived inline shell (Settings::default_inline_shell(), built from the unix_default_inline_shell_args / windows_default_inline_shell_args settings). If that setting resolves to an empty list, split_first() returns None and mise bails with this message before running any hook. It only fires when at least one hook is registered for the phase being reached.

Source

Thrown at src/system/hooks.rs:133

            _ => bail!("{message}"),
        }
    }
    Ok(out)
}

pub async fn run_phase(
    hooks: &[BootstrapHook],
    phase: BootstrapHookPhase,
    dry_run: bool,
) -> Result<()> {
    let phase_hooks: Vec<_> = hooks.iter().filter(|hook| hook.phase == phase).collect();
    if phase_hooks.is_empty() {
        return Ok(());
    }
    info!("bootstrap: {phase} hooks");
    let shell = Settings::get().default_inline_shell()?;
    let Some((program, shell_args)) = shell.split_first() else {
        bail!("default inline shell args must not be empty");
    };
    for hook in phase_hooks {
        if dry_run {
            miseprintln!("{} {}", shell.join(" "), shell_words::quote(&hook.run));
            continue;
        }
        info!("$ {}", hook.run);
        crate::cmd::CmdLineRunner::new(program)
            .cmd_body_args(shell_args, &hook.run)
            .raw(true)
            .execute_async()
            .await?;
    }
    Ok(())
}

#[cfg(test)]
mod tests {

View on GitHub (pinned to 9dcfcaa0dc)

Solutions

  1. Check the active value: `mise settings get unix_default_inline_shell_args` (or windows_default_inline_shell_args) and set a real shell, e.g. `mise settings set unix_default_inline_shell_args "sh -c"`
  2. Remove the empty override so the built-in default applies
  3. Re-run mise bootstrap and confirm the phase hooks execute

Example fix

# before (settings)
unix_default_inline_shell_args = ""

# after
unix_default_inline_shell_args = "sh -c"
Defensive patterns

Strategy: validation

Validate before calling

# confirm the inline shell resolves to a non-empty program before bootstrap
mise settings get unix_default_inline_shell_args 2>/dev/null || true
# on macOS/Linux it must print something like: sh -c

Prevention

When it happens

Trigger: Setting unix_default_inline_shell_args = "" (or windows_default_inline_shell_args = "" on Windows) in mise settings while [bootstrap.hooks] defines at least one command, then running mise bootstrap to a phase with hooks.

Common situations: Hardening profiles that override the inline shell and accidentally blank it; hand-edited settings.toml entries that shell-word-split to zero tokens; environment-specific settings files overriding the shell.

Related errors


AI-assisted analysis of jdx/mise@9dcfcaa0dc (2026-08-17). Data as JSON: /api/errors/9b9f8caf6c4e75ed. Report an issue: GitHub.