1
0
Fork 0
mirror of https://github.com/denoland/deno.git synced 2024-11-25 15:29:32 -05:00

fix(cli): deno upgrade --canary always downloaded latest version even if it was already latest (#15639)

Closes #15570
This commit is contained in:
cuobiezi 2022-08-28 01:46:38 +08:00 committed by GitHub
parent 8e1c0e5141
commit dbfaaddb4f
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -79,8 +79,7 @@ pub async fn upgrade(upgrade_flags: UpgradeFlags) -> Result<(), AnyError> {
};
let current_is_most_recent = if upgrade_flags.canary {
let mut latest_hash = latest_version.clone();
latest_hash.truncate(7);
let latest_hash = latest_version.clone();
crate::version::GIT_COMMIT_HASH == latest_hash
} else if !crate::version::is_canary() {
let current = semver::Version::parse(&crate::version::deno()).unwrap();