Skip to content

Commit

Permalink
Added Chrome browser installation on Mac on Arm
Browse files Browse the repository at this point in the history
  • Loading branch information
initprism committed Feb 16, 2023
1 parent c97e71b commit 61e78fb
Showing 1 changed file with 14 additions and 2 deletions.
16 changes: 14 additions & 2 deletions src/browser/fetcher.rs
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,9 @@ const DEFAULT_HOST: &str = "https://storage.googleapis.com";

#[cfg(target_os = "linux")]
const PLATFORM: &str = "linux";
#[cfg(target_os = "macos")]
#[cfg(all(target_os = "macos", target_arch="aarch64"))]
const PLATFORM: &str = "mac_arm";
#[cfg(all(target_os = "macos", not(target_arch="aarch64")))]
const PLATFORM: &str = "mac";
#[cfg(windows)]
const PLATFORM: &str = "win";
Expand Down Expand Up @@ -346,7 +348,7 @@ where
))
}

#[cfg(target_os = "macos")]
#[cfg(all(target_os = "macos", not(target_arch="aarch64")))]
{
Ok(format!(
"{}/chromium-browser-snapshots/Mac/{}/{}.zip",
Expand All @@ -356,6 +358,16 @@ where
))
}

#[cfg(all(target_os = "macos", target_arch="aarch64"))]
{
Ok(format!(
"{}/chromium-browser-snapshots/Mac_Arm/{}/{}.zip",
DEFAULT_HOST,
revision.as_ref(),
archive_name(revision.as_ref())?
))
}

#[cfg(windows)]
{
Ok(format!(
Expand Down

0 comments on commit 61e78fb

Please sign in to comment.