1
0
Fork 0
mirror of https://github.com/denoland/deno.git synced 2024-12-22 23:34:47 -05:00

fix(upgrade): Added error message when using canary option with M1 (#16382)

before
```
Looking up latest version
Found latest version 8c9e6c5565
Checking https://dl.deno.land/canary/8c9e6c5565c1c00437d083de76cdd944e44b1d99/deno-aarch64-apple-darwin.zip
Download could not be found, aborting
```

after
```
Looking up latest canary version
Found latest version 8c9e6c5565
error: Canary builds are not available for M1
```

Co-authored-by: Bartek Iwańczuk <biwanczuk@gmail.com>
This commit is contained in:
doi yuki 2022-10-26 22:51:22 +09:00 committed by GitHub
parent 193b8828c5
commit 5d45d2a7e0
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -298,6 +298,10 @@ pub async fn upgrade(upgrade_flags: UpgradeFlags) -> Result<(), AnyError> {
};
let download_url = if upgrade_flags.canary {
if env!("TARGET") == "aarch64-apple-darwin" {
bail!("Canary builds are not available for M1");
}
format!(
"https://dl.deno.land/canary/{}/{}",
install_version, *ARCHIVE_NAME