Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add rosetta detection #7

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open

Conversation

kristian240
Copy link

@kristian240 kristian240 commented Nov 19, 2023

After setup, check if apple silicon and no rosetta and log a note to user to install the rosetta.

Inspired by wasp-lang/wasp#1559

@kristian240 kristian240 mentioned this pull request Nov 19, 2023
6 tasks
Copy link
Member

@Martinsos Martinsos left a comment

Choose a reason for hiding this comment

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

Great @kristian240 , this will be welcome addition!

Left some small comments.

# 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} ."

@@ -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"

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants