{"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":"validation","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/533346cc374382b41ec5ff70536252b2e96e725c/src/backend/cargo.rs#L261-L297","documentation":"mise's cargo backend resolves whether cargo-binstall is usable (BinstallStatus::Disabled means binstall exists but is disabled via settings). When the user has set cargo.binstall_only = true (forbidding source builds via `cargo install`) but binstall is disabled, no installation path remains that satisfies the setting, so mise fails immediately instead of falling back.","triggerScenarios":"Running `mise use/install` on a cargo: tool while Settings::get().cargo.binstall_only is true and BinstallStatus::Disabled (e.g. settings disable cargo-binstall, or internal binstall is turned off via config).","commonSituations":"User enables cargo.binstall_only to avoid slow/rusty source builds but has also disabled cargo-binstall (cargo.binstall = false or equivalent), then installs any crate-only tool; CI config copied from a binstall-enabled machine onto one with binstall disabled.","solutions":["Re-enable cargo-binstall (remove the setting disabling it) so binstall_only can be honored.","Set cargo.binstall_only = false (or remove it) to allow falling back to `cargo install` from source.","Prefer a non-cargo backend (aqua:/github:) for the tool if a prebuilt release exists."],"exampleFix":"# before (settings.toml)\n[cargo]\nbinstall = false\nbinstall_only = true\n\n# after\n[cargo]\nbinstall = true\nbinstall_only = true","handlingStrategy":"validation","validationCode":"# shell\ngrep -n 'binstall' ~/.config/mise/settings.toml  # binstall and binstall_only must not conflict","typeGuard":null,"tryCatchPattern":"// rust\nif settings.cargo.binstall_only && !settings.cargo.binstall_enabled() {\n    eprintln!(\"binstall_only requires cargo-binstall to be enabled\");\n}","preventionTips":["Keep cargo.binstall and cargo.binstall_only consistent in settings","Only set binstall_only on machines where cargo-binstall is actually available","Document the required binstall setting when sharing config across machines"],"tags":["cargo","binstall","settings","conflicting-config"],"backgroundTag":"conflicting-config-options","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"}