jdx/mise · error

error running {}: exited with code {} {}

Error message

error running {}: exited with code {}
{}

What it means

During fetch_remote_versions, the asdf plugin backend runs the plugin's `list-all` script. If the child process exits with a nonzero code, mise bails with 'error running <script>: exited with code N' plus the captured stderr, so the plugin failure surfaces instead of an empty version list.

Source

Thrown at src/plugins/asdf_plugin.rs:132

            },
            Settings::get().fetch_remote_versions_timeout(),
        )
        .wrap_err_with(|| {
            let script = script_man.get_script_path(&Script::ListAll);
            eyre!("Failed to run {}", display_path(script))
        })?;
        let stdout = String::from_utf8(result.stdout).unwrap();
        let stderr = String::from_utf8(result.stderr).unwrap().trim().to_string();

        let display_stderr = || {
            if !stderr.is_empty() {
                eprintln!("{stderr}");
            }
        };
        if !result.status.success() {
            let s = Script::ListAll;
            match result.status.code() {
                Some(code) => bail!("error running {}: exited with code {}\n{}", s, code, stderr),
                None => bail!("error running {}: terminated by signal\n{}", s, stderr),
            };
        } else if Settings::get().verbose {
            display_stderr();
        }

        Ok(stdout
            .split_whitespace()
            .map(|v| regex!(r"^v(\d+)").replace(v, "$1").to_string())
            .collect())
    }
    pub(crate) fn fetch_latest_stable(
        &self,
        script_man: &ScriptManager,
    ) -> eyre::Result<Option<String>> {
        let latest_stable = script_man.read(&Script::LatestStable)?.trim().to_string();
        Ok(if latest_stable.is_empty() {
            None

View on GitHub (pinned to afd2eddd3a)

Solutions

  1. Read the stderr appended to the message — it contains the plugin script's own error output; fix that root cause first.
  2. Update or reinstall the plugin: `mise plugin update <name>` or remove and re-add it (`mise plugin remove <name> && mise plugin add <name>`).
  3. Run with `MISE_DEBUG=1` to see the exact command and environment mise used.
  4. If the plugin is unmaintained, switch to a core/vfox/aqua-backed tool that doesn't rely on the asdf script.
Defensive patterns

Strategy: retry

Try / catch

// mise CLI: capture stderr appended to the message and retry after fixing the plugin
try {
  execSync('mise ls-remote node');
} catch (e) {
  if (/error running .*list-all.*exited with code/.test(e.stderr ?? '')) {
    execSync('mise plugin update <name>'); // then retry
  }
  throw e;
}

Prevention

When it happens

Trigger: Running `mise ls-remote <plugin>` / install / latest resolution where the asdf plugin's bin/list-all script returns a nonzero exit status — broken plugin script, missing curl/git inside the script, bad network, or plugin requiring missing system deps.

Common situations: Outdated third-party asdf plugins whose upstream repo moved; GitHub rate limiting inside list-all; missing jq/curl on PATH in minimal containers; plugin installed from a fork with bugs.

Related errors


AI-assisted analysis of jdx/mise@afd2eddd3a (2026-09-09). Data as JSON: /api/errors/8bf150bc2db710ab. Report an issue: GitHub.