Print on missing version and return (#1412)
This commit is contained in:
parent
6d3a7e54ec
commit
152658bfae
|
@ -55,11 +55,17 @@ pub fn use_version(version: &Version) -> Result<()> {
|
|||
"anchor-cli {} is not installed, would you like to install it? (y/n)",
|
||||
version
|
||||
))
|
||||
.with_initial_text("y")
|
||||
.default("n".into())
|
||||
.interact_text()?;
|
||||
if matches!(input.as_str(), "y" | "yy" | "Y" | "yes" | "Yes") {
|
||||
install_version(version)?;
|
||||
} else {
|
||||
println!(
|
||||
"Version {} is not installed, staying on version {}.",
|
||||
version,
|
||||
current_version()?
|
||||
);
|
||||
return Ok(());
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue