{"record":{"id":"767961ca01c1f6cf","repo":"jdx/mise","slug":"rustup-show-profile-returned-an-empty-profile-for","errorCode":null,"errorMessage":"rustup show profile returned an empty profile for {}","messagePattern":"rustup show profile returned an empty profile for (.+?)","errorType":"exception","errorClass":null,"httpStatus":null,"severity":"error","filePath":"src/plugins/core/rust.rs","lineNumber":281,"sourceCode":"        let mut cmd = cmd(runtime.bin_dir.join(RUSTUP_BIN), args)\n            .env(\"PATH\", rustup_path_env(runtime)?)\n            .stdout_capture()\n            .stderr_capture()\n            .unchecked();\n        for (key, value) in rustup_env(&runtime.homes, &tv.version) {\n            cmd = cmd.env(key, value);\n        }\n        let output = cmd.run()?;\n        if !output.status.success() {\n            bail!(\n                \"rustup show profile failed for {}: {}\",\n                tv.style(),\n                String::from_utf8_lossy(&output.stderr).trim()\n            );\n        }\n        let profile = String::from_utf8_lossy(&output.stdout).trim().to_string();\n        if profile.is_empty() {\n            bail!(\n                \"rustup show profile returned an empty profile for {}\",\n                tv.style()\n            );\n        }\n        Ok(profile)\n    }\n\n    fn missing_components(\n        &self,\n        requested: &[String],\n        installed: &BTreeSet<String>,\n    ) -> Vec<String> {\n        requested\n            .iter()\n            .filter(|component| !rustup_component_installed(installed, component))\n            .cloned()\n            .collect()\n    }","sourceCodeStart":263,"sourceCodeEnd":299,"githubUrl":"https://github.com/jdx/mise/blob/533346cc374382b41ec5ff70536252b2e96e725c/src/plugins/core/rust.rs#L263-L299","documentation":"mise runs `rustup show` to learn the default profile for a Rust tool version; if the command succeeds but prints an empty trimmed stdout, mise cannot proceed and bails rather than guessing a profile. This protects the install/satisfaction logic from silently operating on unknown rustup state.","triggerScenarios":"install_version_ or is_install_satisfied on a rust tool version where `rustup show profile` returns exit code 0 but empty stdout — e.g. rustup printing nothing for the queried key due to an unexpected rustup version or unusual toolchain state.","commonSituations":"Nonstandard or very old rustup versions whose `rustup show` output format differs; rustup with a default-toolchain none and empty settings; rustup wrappers/proxies swallowing output.","solutions":["Verify `rustup show` prints expected output manually; update rustup (`rustup self update`) to a current version","Set a default toolchain and profile explicitly: `rustup set default-host`/`rustup default stable` and `rustup set profile minimal`","If a wrapper/shim is intercepting rustup, ensure mise's rustup_env points at the real rustup binary"],"exampleFix":null,"handlingStrategy":"validation","validationCode":"const out = require('child_process').execSync('rustup show').toString().trim();\nif (!out) console.error('rustup show returned empty output; update rustup before using mise rust');","typeGuard":null,"tryCatchPattern":"try { await miseInstall('rust', version); } catch (e) { if (String(e).includes('empty profile')) { console.error('Update rustup and set a default profile: rustup set profile minimal'); } else throw e; }","preventionTips":["Use a current rustup version (output format compatibility)","Set a default toolchain and profile explicitly","Avoid rustup wrappers/proxies that could swallow stdout"],"tags":["rust","rustup","empty-output","core-plugin"],"backgroundTag":"empty-response-body","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"}