{"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/533346cc374382b41ec5ff70536252b2e96e725c/src/plugins/asdf_plugin.rs#L114-L150","documentation":"When fetching remote versions for an asdf plugin, mise runs the plugin's `list-all` script. This error is thrown when that script exits with a non-zero exit code, surfacing the plugin's stderr so the underlying failure (bad curl, missing dependency, plugin bug) is visible.","triggerScenarios":"Running `mise ls-remote <plugin>` or installing/resolving `latest` for an asdf plugin whose `list-all` script fails with a numeric exit code.","commonSituations":"Plugin's list-all calls curl/wget and the network is down; GitHub rate limits or API failures inside the plugin script; a broken or abandoned plugin with outdated URLs; missing tools (git, curl) the plugin depends on.","solutions":["Read the stderr tail in the error to see the plugin's actual failure","Fix network/proxy access (check curl works, set proxy or GITHUB_TOKEN to avoid rate limits)","Update or reinstall the plugin (`mise plugin update <name>` / `mise plugin remove` + `mise plugin add`)","Replace the asdf plugin with a core mise tool or aqua/github backend equivalent"],"exampleFix":"// before\nmise ls-remote nodejs   # plugin script fails silently on rate limit\n// after\nexport GITHUB_TOKEN=$(gh auth token)\nmise plugin update nodejs && mise ls-remote nodejs","handlingStrategy":"retry","validationCode":"# before relying on the plugin, verify list-all works\nmise exec -- curl -sI https://github.com >/dev/null && mise plugin list --urls","typeGuard":"null","tryCatchPattern":"catch (e) {\n  if (/error running .*list-all|exited with code/.test(String(e))) {\n    // inspect stderr in e, fix network/creds, retry with token\n  }\n}","preventionTips":["Set GITHUB_TOKEN/MISE_GITHUB_TOKEN to avoid API rate limits in plugin scripts","Pin and periodically update plugins (`mise plugin update`)","Prefer core/aqua/github backends over asdf plugins where available","Ensure curl, git and other script dependencies exist in CI images"],"tags":["asdf","plugin","command-failed","network"],"backgroundTag":"git-command-failed","analyzedSha":"533346cc374382b41ec5ff70536252b2e96e725c","analyzedAt":"2026-09-17T13:35:38.149Z","contentChangedAt":"2026-09-17T13:35:38.149Z","schemaVersion":2},"datasetVersion":"2026-09-23T08:17:48.524Z"}