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

get-arch: improve Apple Silicon detection with uname -v #243

Merged
merged 4 commits into from
Oct 28, 2024

Conversation

Coeur
Copy link
Contributor

@Coeur Coeur commented Aug 20, 2024

uname -a is the same as uname -m -n -r -s -v, but the only relevant part that needs to be compared against ARM64 is the -v one.

This is especially important in case the name of the machine (uname -n) contains the string ARM64 (don't ask me why someone would do that).

➜  ~ uname -a
Darwin MacBook-Pro-WITH-A-WEIRD-NAME.local 24.0.0 Darwin Kernel Version 24.0.0: Wed Aug  7 03:08:06 PDT 2024; root:xnu-11215.1.9~22/RELEASE_ARM64_T6031 x86_64
➜  ~ uname -v
Darwin Kernel Version 24.0.0: Wed Aug  7 03:08:06 PDT 2024; root:xnu-11215.1.9~22/RELEASE_ARM64_T6031

Once this PR is merged, don't forget @balupton to update your Stack Overflow answer at https://stackoverflow.com/a/68148776 to replace uname -a with uname -v. Although, I've added my own answer too: https://stackoverflow.com/a/78891773

@balupton
Copy link
Member

LGTM. I'll fix the tests this week then merge. Happy to have you here.

@balupton balupton changed the title improve Apple Silicon detection with uname -v get-arch: improve Apple Silicon detection with uname -v Oct 27, 2024
@balupton balupton self-requested a review October 27, 2024 23:59
@balupton balupton self-assigned this Oct 28, 2024
@balupton
Copy link
Member

There needs to be more work to get the tests going. I'll fix that up later. Turns out the help outputs were also wrong, so I've fixed that. Merging, thank you.

@balupton balupton merged commit 91711b1 into bevry:master Oct 28, 2024
1 of 17 checks passed
@Coeur Coeur deleted the coeur/uname--v branch October 28, 2024 07:00
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

2 participants