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

feat: adds support for M1 macbooks to curl installer #978

Closed
wants to merge 1 commit into from
Closed
Show file tree
Hide file tree
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
7 changes: 7 additions & 0 deletions docs/_installer/init.sh
Original file line number Diff line number Diff line change
Expand Up @@ -92,6 +92,13 @@ get_architecture() {
fi
fi

if [ "$_ostype" = Darwin -a "$_cputype" = arm64 ]; then
# Darwin `uname -s` doesn't seem to lie on Big Sur
# but we want to serve x86_64 binaries anyway that they can
# then run in x86_64 emulation mode on their arm64 devices
local _cputype=x86_64
fi

case "$_ostype" in
Linux)
local _ostype=unknown-linux-musl
Expand Down
2 changes: 1 addition & 1 deletion npm/binary.js
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ const getPlatform = () => {
if (type === "Linux" && arch === "x64") {
return "x86_64-unknown-linux-musl";
}
if (type === "Darwin" && arch === "x64") {
if (type === "Darwin" && (arch === "x64" || arch === "arm64")) {
return "x86_64-apple-darwin";
}

Expand Down