Skip to content

Commit bbecd2d

Browse files
committed
Avoid sysctl: unknown oid 'hw.optional.arm64' stderr output on Intel Macs.
1 parent 4dfe254 commit bbecd2d

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

rustup-init.sh

+2-1
Original file line numberDiff line numberDiff line change
@@ -265,7 +265,8 @@ get_architecture() {
265265
_cputype=x86_64
266266
fi
267267
elif [ "$_cputype" = x86_64 ]; then
268-
if sysctl hw.optional.arm64 | grep -q ': 1'; then
268+
# Avoid `sysctl: unknown oid 'hw.optional.arm64'` stderr output on Intel Macs.
269+
if sysctl hw.optional.arm64 2> /dev/null | grep -q ': 1'; then
269270
_cputype=arm64
270271
fi
271272
fi

0 commit comments

Comments
 (0)