{"record":{"id":"8bf150bc2db710ab","repo":"jdx/mise","slug":"error-running-exited-with-code","errorCode":null,"errorMessage":"error running {}: exited with code {}\n{}","messagePattern":"error running (.+?): exited with code (.+?)\n(.+?)","errorType":"exception","errorClass":null,"httpStatus":null,"severity":"error","filePath":"src/plugins/asdf_plugin.rs","lineNumber":132,"sourceCode":"            },\n            Settings::get().fetch_remote_versions_timeout(),\n        )\n        .wrap_err_with(|| {\n            let script = script_man.get_script_path(&Script::ListAll);\n            eyre!(\"Failed to run {}\", display_path(script))\n        })?;\n        let stdout = String::from_utf8(result.stdout).unwrap();\n        let stderr = String::from_utf8(result.stderr).unwrap().trim().to_string();\n\n        let display_stderr = || {\n            if !stderr.is_empty() {\n                eprintln!(\"{stderr}\");\n            }\n        };\n        if !result.status.success() {\n            let s = Script::ListAll;\n            match result.status.code() {\n                Some(code) => bail!(\"error running {}: exited with code {}\\n{}\", s, code, stderr),\n                None => bail!(\"error running {}: terminated by signal\\n{}\", s, stderr),\n            };\n        } else if Settings::get().verbose {\n            display_stderr();\n        }\n\n        Ok(stdout\n            .split_whitespace()\n            .map(|v| regex!(r\"^v(\\d+)\").replace(v, \"$1\").to_string())\n            .collect())\n    }\n    pub(crate) fn fetch_latest_stable(\n        &self,\n        script_man: &ScriptManager,\n    ) -> eyre::Result<Option<String>> {\n        let latest_stable = script_man.read(&Script::LatestStable)?.trim().to_string();\n        Ok(if latest_stable.is_empty() {\n            None","sourceCodeStart":114,"sourceCodeEnd":150,"githubUrl":"https://github.com/jdx/mise/blob/afd2eddd3a50c16190efc1c7e94404b48f72af57/src/plugins/asdf_plugin.rs#L114-L150","documentation":"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.","triggerScenarios":"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.","commonSituations":"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.","solutions":["Read the stderr appended to the message — it contains the plugin script's own error output; fix that root cause first.","Update or reinstall the plugin: `mise plugin update <name>` or remove and re-add it (`mise plugin remove <name> && mise plugin add <name>`).","Run with `MISE_DEBUG=1` to see the exact command and environment mise used.","If the plugin is unmaintained, switch to a core/vfox/aqua-backed tool that doesn't rely on the asdf script."],"exampleFix":null,"handlingStrategy":"retry","validationCode":null,"typeGuard":null,"tryCatchPattern":"// mise CLI: capture stderr appended to the message and retry after fixing the plugin\ntry {\n  execSync('mise ls-remote node');\n} catch (e) {\n  if (/error running .*list-all.*exited with code/.test(e.stderr ?? '')) {\n    execSync('mise plugin update <name>'); // then retry\n  }\n  throw e;\n}","preventionTips":["Keep asdf plugins updated (`mise plugin update --all`) so list-all scripts track upstream changes.","Install common script dependencies (curl, git, jq) in CI images.","Prefer core/aqua/vfox backends over asdf scripts where available."],"tags":["asdf","plugin","subprocess","network"],"backgroundTag":"command-not-found","analyzedSha":"afd2eddd3a50c16190efc1c7e94404b48f72af57","analyzedAt":"2026-09-09T01:38:25.179Z","contentChangedAt":"2026-09-09T01:38:25.179Z","schemaVersion":2},"datasetVersion":"2026-09-14T00:17:10.932Z"}