jdx/mise · error

command exited with non-zero status

Error message

command exited with non-zero status: {}

What it means

Raised by CmdLineRunner::read_isolated, which captures a command's bounded output with its own deadline and child-tree ownership. If the isolated process exits with a non-zero status, the runner bails with this message instead of returning captured stdout. Unlike the formatted helpers, it only includes the ExitStatus, so details must come from separately captured stderr.

Solutions

  1. Check the command's stderr (captured by output_isolated) or run the command manually to see the real failure.
  2. Verify the plugin/tool script exists, is executable, and runs under the expected interpreter.
  3. Reinstall or update the affected plugin/tool whose helper is failing.
  4. Inspect mise logs with MISE_DEBUG=1 to see the full command and output around the failure.

Example fix

// debug the failing isolated command
MISE_DEBUG=1 mise ls-remote <tool>
// or reinstall the misbehaving tool/plugin
mise uninstall <tool> && mise install <tool>
Defensive patterns

Strategy: try-catch

Validate before calling

# Sanity-check the plugin/tool helper works standalone
<path-to-tool-helper> --version || echo 'helper itself is broken'

Try / catch

match read_isolated_result {
    Err(e) if e.to_string().starts_with("command exited with non-zero status") => {
        // fetch captured stderr via debug logs (MISE_DEBUG=1) and report
        Err(anyhow!("isolated command failed; see mise debug logs"))
    }
    other => other,
}

Prevention

When it happens

Trigger: Calling read_isolated (directly or via output_isolated) on a command that finishes unsuccessfully — e.g. reading tool metadata or plugin output where the child returns a failing exit code.

Common situations: A plugin or helper script erroring during version listing or metadata reads; commands failing due to a missing interpreter, bad plugin code, or corrupt tool installation.

Understand the failure class

Background: "git command failed": what it means when a tool shells out to git and git exits non-zero — this error's family across 21 libraries.

Related errors


AI-assisted analysis of jdx/mise@533346cc37 (2026-09-17). Data as JSON: /api/errors/4df38b2746bc8613. Report an issue: GitHub.

Appendix: source

Thrown at src/cmd/bounded.rs:14

//! Bounded capture for non-interactive vendor generators and host probes.
use super::*;
use eyre::eyre;
use std::sync::atomic::{AtomicUsize, Ordering};
// `cmd` imports this only for the unix reader, so name it here too.
use tokio::io::AsyncRead;

impl CmdLineRunner<'_> {
    /// Capture a finite response, with one deadline for the process and pipes.
    /// This command owns its child tree even when mise itself is nested.
    pub(crate) async fn read_isolated(self, limit: usize) -> Result<String> {
        let output = self.output_isolated(limit).await?;
        if !output.status.success() {
            bail!("command exited with non-zero status: {}", output.status);
        }
        Ok(String::from_utf8(output.stdout)?.trim_end().to_string())
    }

    /// Return the exit status and bounded output without replaying command output.
    pub(crate) async fn output_isolated(mut self, limit: usize) -> Result<std::process::Output> {
        let _read_lock = super::raw_read_lock().await;
        let timeout = self.timeout.unwrap_or(Duration::from_secs(5));
        self.cmd.kill_on_drop(true);
        self.cmd
            .stdin(Stdio::null())
            .stdout(Stdio::piped())
            .stderr(Stdio::piped());
        #[cfg(unix)]
        {
            self.cmd.env(TASK_PGID_MANAGED_ENV, "1");
            self.cmd.process_group(0);
        }

View on GitHub (pinned to 533346cc37)