diff options
author | doi yuki <10039786+ydoi@users.noreply.github.com> | 2022-10-26 22:51:22 +0900 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-10-26 15:51:22 +0200 |
commit | 5d45d2a7e0f5fef6323adcdda40fdadf7b1e87ad (patch) | |
tree | b879d42a5cb8a790dc16e6f8444c4d6ba6cdf868 | |
parent | 193b8828c5b437b61d6310391fff6a9c6f393b0a (diff) |
fix(upgrade): Added error message when using canary option with M1 (#16382)
before
```
Looking up latest version
Found latest version 8c9e6c5565c1c00437d083de76cdd944e44b1d99
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 8c9e6c5565c1c00437d083de76cdd944e44b1d99
error: Canary builds are not available for M1
```
Co-authored-by: Bartek IwaĆczuk <biwanczuk@gmail.com>
-rw-r--r-- | cli/tools/upgrade.rs | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/cli/tools/upgrade.rs b/cli/tools/upgrade.rs index c1b63a057..eaead9ff6 100644 --- a/cli/tools/upgrade.rs +++ b/cli/tools/upgrade.rs @@ -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 |