jdx/mise · error
exited with non-zero status: {status}
Error message
exited with non-zero status: {status} What it means
The executed command finished but returned a non-zero exit status, and no timeout was involved. In this hashed-runner path the command's stdout/stderr are consumed internally for hashing, so mise reports only the status string (e.g. `exited with non-zero status: exit status: 1`) rather than replaying captured output.
Source
Thrown at src/cmd.rs:1462
};
if let Err(err) = consume(output) {
#[cfg(unix)]
signal_process_tree(id, nix::sys::signal::Signal::SIGKILL);
#[cfg(windows)]
kill_process_tree(id);
return Err(err);
}
}
if let Some(guard) = &timeout_guard {
guard.cancel();
}
let status = status.expect("command wait must complete");
if !status.success() {
if let Some(timeout) = timeout_guard.as_ref().and_then(|guard| guard.timed_out()) {
bail!("timed out after {timeout:?}");
}
bail!("exited with non-zero status: {status}");
}
Ok((
stdout_hasher.finalize().to_hex().to_string(),
stderr_hasher.finalize().to_hex().to_string(),
))
}
/// Run the command and return stdout, even when raw mode is enabled.
pub(crate) async fn read(mut self) -> Result<String> {
let _read_lock = RAW_LOCK.read().await;
debug!("$ {self}");
self.cmd.kill_on_drop(true);
#[cfg(unix)]
if should_use_pgroup() {
self.cmd.env(TASK_PGID_MANAGED_ENV, "1");
unsafe {
self.cmd.as_std_mut().pre_exec(|| {
let stdin = std::os::fd::BorrowedFd::borrow_raw(0);View on GitHub (pinned to afd2eddd3a)
Solutions
- Run the same command manually in your shell to see its real error output (this path hides it for hashing).
- Fix the underlying command failure (missing tool, bad flags, invalid config, network error).
- If non-zero is expected/acceptable, guard the call (`cmd || true`) or use a runner variant that tolerates failure.
- Check that PATH/env inside mise matches your shell (mise shims vs system tools can resolve differently).
Defensive patterns
Strategy: try-catch
Validate before calling
// Reproduce the probe locally and check its exit status first: $ mise exec -- sh -c 'cmd args'; echo "exit=$?"
Try / catch
match runner.execute_hashes().await {
Err(e) if e.to_string().contains("exited with non-zero status") => {
eprintln!("probe failed; run the command manually for details: {e}");
}
other => other?,
} Prevention
- Run any command used as a probe manually once to confirm it exits 0 in a clean env.
- Keep PATH/env assumptions minimal — mise's env can differ from your shell.
- Make scripts exit 0 on expected 'not found' outcomes rather than failing.
- Log the command line alongside the error so failures are diagnosable.
When it happens
Trigger: Raised at src/cmd.rs:1462 in execute_hashes_async_with_drain_timeout whenever `status.success()` is false and `timeout_guard.timed_out()` is None — any failing command executed via execute_hashes_async (non-interactive probes with piped, hashed output).
Common situations: Version-check or probe commands failing because the tool isn't installed correctly, a config file referenced by the command is invalid, network calls inside the command fail, or the script itself exits non-zero by design.
Related errors
- bootstrap from repository failed with {status}
- timed out after {timeout:?}
- {display_program} {display_args} failed: exit code {} {}
- {program} {display_args} failed: exit code {} {}
- command exited with non-zero status: {status}
AI-assisted analysis of jdx/mise@afd2eddd3a (2026-09-09).
Data as JSON: /api/errors/d42930c911ab679d.
Report an issue: GitHub.