{"record":{"id":"405dcebbe594a537","repo":"jdx/mise","slug":"cargo-binstall-is-disabled-but-cargo-binstall-onl","errorCode":null,"errorMessage":"cargo-binstall is disabled, but cargo.binstall_only is set","messagePattern":"cargo-binstall is disabled, but cargo\\.binstall_only is set","errorType":"exception","errorClass":null,"httpStatus":null,"severity":"error","filePath":"src/backend/cargo.rs","lineNumber":279,"sourceCode":"                    let result = self\n                        .execute_install_command(ctx, &tv, cmd.arg(&install_arg))\n                        .await;\n                    if result.as_ref().is_ok() {\n                        self.write_install_state_best_effort(&tv);\n                        return Ok(tv.clone());\n                    }\n                    if Settings::get().cargo.binstall_only\n                        || !result.as_ref().is_err_and(|err| {\n                            Error::get_exit_status(err)\n                                == Some(CARGO_BINSTALL_NO_FALLBACK_EXIT_CODE)\n                        })\n                    {\n                        result?;\n                    }\n                    info!(\"cargo-binstall found no prebuilt binary; falling back to cargo install\");\n                }\n                BinstallStatus::Disabled if Settings::get().cargo.binstall_only => {\n                    bail!(\"cargo-binstall is disabled, but cargo.binstall_only is set\");\n                }\n                _ if Settings::get().cargo.binstall_only => {\n                    bail!(\"cargo-binstall is not available, but cargo.binstall_only is set\");\n                }\n                BinstallStatus::Unavailable => match Settings::get().cargo.binstall_native {\n                    Some(true)\n                        if self\n                            .native_binstall(ctx, &tv, NativeBinstallAction::Install)\n                            .await? =>\n                    {\n                        self.write_install_state_best_effort(&tv);\n                        return Ok(tv.clone());\n                    }\n                    Some(_) => {}\n                    None if native_binstall::rollout_warning_active() => {\n                        self.native_binstall(ctx, &tv, NativeBinstallAction::WarnOnly)\n                            .await?;\n                    }","sourceCodeStart":261,"sourceCodeEnd":297,"githubUrl":"https://github.com/jdx/mise/blob/afd2eddd3a50c16190efc1c7e94404b48f72af57/src/backend/cargo.rs#L261-L297","documentation":"The cargo backend's binstall preflight records BinstallStatus::Disabled (the user disabled cargo-binstall via settings). If the user also set `cargo.binstall_only = true` — meaning only prebuilt binstall artifacts may be used, never `cargo install` from source — these settings contradict and mise bails rather than silently compiling from source.","triggerScenarios":"`mise install cargo:<crate>` (via install_version_) with settings `cargo.binstall = false` (binstall disabled) AND `cargo.binstall_only = true`.","commonSituations":"User previously disabled binstall to force source builds, then later set binstall_only expecting prebuilt-only installs; copied settings.toml from another machine where binstall was disabled.","solutions":["Re-enable cargo-binstall (remove the `cargo.binstall = false` / binstall disable setting) so binstall_only can be honored.","Remove `cargo.binstall_only = true` from settings so mise may fall back to `cargo install`.","Verify with `mise settings get cargo.binstall_only` and `mise settings get cargo.binstall` before installing."],"exampleFix":"// before (settings.toml)\n[cargo]\nbinstall = false\nbinstall_only = true\n\n// after (settings.toml)\n[cargo]\nbinstall = true\nbinstall_only = true","handlingStrategy":"validation","validationCode":"import subprocess, sys\ndef preflight():\n    s = subprocess.run(['mise','settings','get','cargo.binstall_only'],capture_output=True,text=True)\n    b = subprocess.run(['mise','settings','get','cargo.binstall'],capture_output=True,text=True)\n    if s.stdout.strip()=='true' and b.stdout.strip()=='false':\n        sys.exit('conflict: cargo.binstall_only=true with binstall disabled')","typeGuard":null,"tryCatchPattern":"try:\n    mise_install(pkg)\nexcept ConflictingCargoSettings:\n    subprocess.run(['mise','settings','set','cargo.binstall','true'],check=True)\n    mise_install(pkg)","preventionTips":["Never combine cargo.binstall=false with cargo.binstall_only=true.","Audit settings.toml before enabling binstall_only.","Check `mise settings ls cargo` after copying configs between machines."],"tags":["cargo","settings-conflict","binstall","config"],"backgroundTag":"conflicting-config-options","analyzedSha":"afd2eddd3a50c16190efc1c7e94404b48f72af57","analyzedAt":"2026-09-09T01:38:25.179Z","contentChangedAt":"2026-09-09T01:38:25.179Z","schemaVersion":2},"datasetVersion":"2026-09-14T05:17:10.506Z"}