From 5d45d2a7e0f5fef6323adcdda40fdadf7b1e87ad Mon Sep 17 00:00:00 2001 From: doi yuki <10039786+ydoi@users.noreply.github.com> Date: Wed, 26 Oct 2022 22:51:22 +0900 Subject: fix(upgrade): Added error message when using canary option with M1 (#16382) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 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 --- cli/tools/upgrade.rs | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'cli') 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 -- cgit v1.2.3