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

Improve Apple Silicon Mac support #1289

Merged
merged 2 commits into from
Sep 10, 2020
Merged

Improve Apple Silicon Mac support #1289

merged 2 commits into from
Sep 10, 2020

Conversation

ticky
Copy link
Contributor

@ticky ticky commented Sep 9, 2020

Following on from #1237, with new discoveries!

Turns out that in many cases, Apple Silicon Macs will in fact run Bash in amd64 mode, which in turn means the reported architecture is amd64, even though it's an Apple Silicon Mac. Homebrew has worked around this in Homebrew/brew#7995, and we more or less follow their lead here.

This makes it so that we always show our little notice on Apple Silicon Macs, whether their shell is in amd64 or arm64 mode.

Following on from #1237, with new discoveries!

Turns out that in many cases, Apple Silicon Macs will in fact run Bash in amd64 mode, which in turn means the reported architecture is amd64, even though it's an Apple Silicon Mac. Homebrew has worked around this in Homebrew/brew#7995, and we more or less follow their lead here.

This makes it so that we _always_ show our little notice on Apple Silicon Macs, whether their shell is in amd64 or arm64 mode.
@ticky ticky marked this pull request as ready for review September 9, 2020 20:56
@ticky
Copy link
Contributor Author

ticky commented Sep 9, 2020

Confirmed that this works correctly in both modes on Apple Silicon Macs, and that it still runs normally on amd64 Macs.

Copy link
Member

@sj26 sj26 left a comment

Choose a reason for hiding this comment

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

Nice! 🙌

Copy link
Contributor

@yob yob left a comment

Choose a reason for hiding this comment

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

I don't have a mac with apple silicon to test this on, but it makes sense to me 👍

@pda
Copy link
Member

pda commented Sep 10, 2020

Wow, nice work @ticky 🕵️‍♀️

@ticky ticky merged commit 4a922a4 into master Sep 10, 2020
@ticky ticky deleted the apple-silicon-part-two branch September 10, 2020 18:03
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.

4 participants