From 7f2ccd51d4c20cd23d7ba79e4c19f06c40b68470 Mon Sep 17 00:00:00 2001 From: Jordan Harband Date: Thu, 5 Aug 2021 08:05:54 -0700 Subject: [PATCH] [Fix] `nvm_get_arch`: suppress error output if `/sbin` does not exist Introduced by #2469 --- nvm.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/nvm.sh b/nvm.sh index 303b423..8989b7c 100644 --- a/nvm.sh +++ b/nvm.sh @@ -1818,7 +1818,7 @@ nvm_get_arch() { esac # If running a 64bit ARM kernel but a 32bit ARM userland, change ARCH to 32bit ARM (armv7l) - L=$(ls -dl /sbin/init) # if /sbin/init is 32bit executable + L=$(ls -dl /sbin/init 2>/dev/null) # if /sbin/init is 32bit executable if [ "$(uname)" = "Linux" ] && [ "${NVM_ARCH}" = arm64 ] && [ "$(od -An -t x1 -j 4 -N 1 "${L#*-> }")" = ' 01' ]; then NVM_ARCH=armv7l HOST_ARCH=armv7l