diff --git a/src/cli/rustup_mode.rs b/src/cli/rustup_mode.rs
index a0f9d3e7e29..0c820d2d5ae 100644
--- a/src/cli/rustup_mode.rs
+++ b/src/cli/rustup_mode.rs
@@ -928,7 +928,7 @@ fn show(cfg: &Cfg) -> Result<()> {
let cwd = utils::current_dir()?;
let installed_toolchains = cfg.list_toolchains()?;
- let active_toolchain = cfg.find_override_toolchain_or_default(&cwd);
+ let active_toolchain = cfg.find_or_install_override_toolchain_or_default(&cwd);
// active_toolchain will carry the reason we don't have one in its detail.
let active_targets = if let Ok(ref at) = active_toolchain {
@@ -1053,7 +1053,7 @@ fn show(cfg: &Cfg) -> Result<()> {
fn show_active_toolchain(cfg: &Cfg) -> Result<()> {
let cwd = utils::current_dir()?;
- if let Some((toolchain, reason)) = cfg.find_override_toolchain_or_default(&cwd)? {
+ if let Some((toolchain, reason)) = cfg.find_or_install_override_toolchain_or_default(&cwd)? {
if let Some(reason) = reason {
println!("{} ({})", toolchain.name(), reason);
} else {
diff --git a/src/config.rs b/src/config.rs
index d99822a1602..2c49a3e3a6f 100644
--- a/src/config.rs
+++ b/src/config.rs
@@ -309,7 +309,7 @@ impl Cfg {
}
pub fn which_binary(&self, path: &Path, binary: &str) -> Result