From 2018f5020aed03fdc98eafad0f047797e92f7979 Mon Sep 17 00:00:00 2001 From: Jarred Sumner Date: Wed, 3 Nov 2021 15:25:38 -0700 Subject: [PATCH] [installer] Detect rosetta in install.sh --- src/cli/install.sh | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/src/cli/install.sh b/src/cli/install.sh index 80721963bb..bed062dfca 100644 --- a/src/cli/install.sh +++ b/src/cli/install.sh @@ -45,6 +45,14 @@ else esac fi +if [ "$target" = "darwin-x64" ]; then + # Is it rosetta + sysctl sysctl.proc_translated >/dev/null 2>&1 + if [ $? -eq 0 ]; then + target="darwin-aarch64" + fi +fi + github_repo="https://github.com/Jarred-Sumner/bun-releases-for-updater" if [ $# -eq 0 ]; then