Browse Source

create `latest` alias on install

remotes/origin/alias-latest
Pedro Fialho 2 years ago
parent
commit
d2243c1de6
No known key found for this signature in database
GPG Key ID: 3808504D69FC0A02
  1. 10
      src/commands/install.rs

10
src/commands/install.rs

@ -137,6 +137,16 @@ impl super::command::Command for Install { @@ -137,6 +137,16 @@ impl super::command::Command for Install {
other_err => other_err.map_err(|source| Error::DownloadError { source })?,
};
if let UserVersion::Full(Version::Latest) = current_version {
let alias_name = Version::Latest.v_str();
debug!(
"Tagging {} as alias for {}",
alias_name.cyan(),
version.v_str().cyan()
);
create_alias(config, &alias_name, &version)?;
}
if let UserVersion::Full(Version::Lts(lts_type)) = current_version {
let alias_name = Version::Lts(lts_type).v_str();
debug!(

Loading…
Cancel
Save