Skip to content
This repository was archived by the owner on Mar 21, 2025. It is now read-only.
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 12 additions & 0 deletions installer.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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() {
Expand Down Expand Up @@ -66,6 +67,17 @@ get_os_info() {
esac
}

check_for_rosetta() {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I would consider inlining this check inside of install_based_on_os, right after

        "Darwin")
            install_from_bin_package "wasp-macos-x86_64.tar.gz"

# 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}"
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
info "We detected Apple Silicon without Rosetta installed. Make sure to install Rosetta due to compatibility - ${BOLD}softwareupdate --install-rosetta${RESET}"
info "We detected that you are on Apple Silicon (arm64) without Rosetta installed. Since Wasp binary is built for x86_64 and not for arm64, you will need to install Rosetta to use Wasp: ${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
Expand Down