Skip to content

Commit

Permalink
fix(upgrade): Added error message when using canary option with M1 (d…
Browse files Browse the repository at this point in the history
…enoland#16382)

before
```
Looking up latest version
Found latest version 8c9e6c5
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 8c9e6c5
error: Canary builds are not available for M1
```

Co-authored-by: Bartek Iwańczuk <[email protected]>
  • Loading branch information
ydoi and bartlomieju authored Oct 26, 2022
1 parent 193b882 commit 5d45d2a
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions cli/tools/upgrade.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 5d45d2a

Please sign in to comment.