fix(installer): fall back to /usr/sbin/sysctl when sysctl is not on PATH

This commit is contained in:
can1357
2026-07-22 20:23:56 +02:00
parent 87e55d10d7
commit b5b645c921
+1 -1
View File
@@ -76,7 +76,7 @@ has_bun() {
# where `uname -m` reports the translated x86_64.
host_arch() {
if [ "$(uname -s)" = "Darwin" ]; then
if [ "$(sysctl -in hw.optional.arm64 2>/dev/null)" = "1" ]; then
if [ "$(sysctl -in hw.optional.arm64 2>/dev/null || /usr/sbin/sysctl -in hw.optional.arm64 2>/dev/null)" = "1" ]; then
echo "arm64"
else
echo "x64"