Skip to content

Commit 7f2ccd5

Browse files
committed
[Fix] nvm_get_arch: suppress error output if /sbin does not exist
Introduced by nvm-sh#2469
1 parent 7ba49f8 commit 7f2ccd5

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

nvm.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1818,7 +1818,7 @@ nvm_get_arch() {
18181818
esac
18191819

18201820
# If running a 64bit ARM kernel but a 32bit ARM userland, change ARCH to 32bit ARM (armv7l)
1821-
L=$(ls -dl /sbin/init) # if /sbin/init is 32bit executable
1821+
L=$(ls -dl /sbin/init 2>/dev/null) # if /sbin/init is 32bit executable
18221822
if [ "$(uname)" = "Linux" ] && [ "${NVM_ARCH}" = arm64 ] && [ "$(od -An -t x1 -j 4 -N 1 "${L#*-> }")" = ' 01' ]; then
18231823
NVM_ARCH=armv7l
18241824
HOST_ARCH=armv7l

0 commit comments

Comments
 (0)