[Fix] `nvm_get_arch`: suppress error output if `/sbin` does not exist
Introduced by #2469
parent
7ba49f8f71
commit
7f2ccd51d4
2
nvm.sh
2
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
|
||||
|
|
Loading…
Reference in New Issue