diff --git a/installer.sh b/installer.sh index 5d6037c..791716d 100755 --- a/installer.sh +++ b/installer.sh @@ -37,6 +37,7 @@ main() { trap cleanup_temp_dir EXIT send_telemetry > /dev/null 2>&1 & install_based_on_os + check_for_rosetta } install_based_on_os() { @@ -66,6 +67,17 @@ get_os_info() { esac } +check_for_rosetta() { + # check if apple silicon + if [ "$(get_os_info)" = "osx" ] && [ "$(uname -m)" = "arm64" ]; then + # check if rosetta is installed + pgrep -q oahd + if [ $? -ne 0 ]; then + info "We detected Apple Silicon without Rosetta installed. Make sure to install Rosetta due to compatibility - ${BOLD}softwareupdate --install-rosetta${RESET}" + fi + fi +} + # Download a Wasp binary package and install it in $HOME_LOCAL_BIN. install_from_bin_package() { BIN_PACKAGE_NAME=$1