Skip to content
Myr

[Fix] `nvm_get_arch`: suppress error output if `/sbin` does not exist

Before adoption: this commit came in with the history the project adopted, so no landing records it.

Introduced by #2469

authored by Jordan Harband · committed by Jordan Harband · parent 7ba49f8 · Browse files · 1 file+1 added−1 removed
This commit

State

Before adoption: this commit came in with the history the project adopted, so no landing records it.

Diff stats

1 file+1 added−1 removed

  • other:+1 added−1 removed

1 file+1 added−1 removed

modified:nvm.sh+1 added-1 removed
1816 unmodified lines
1817 *) NVM_ARCH="${HOST_ARCH}" ;;1818 esac18191820 # 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 executable1821 L=$(ls -dl /sbin/init 2>/dev/null) # if /sbin/init is 32bit executable1822 if [ "$(uname)" = "Linux" ] && [ "${NVM_ARCH}" = arm64 ] && [ "$(od -An -t x1 -j 4 -N 1 "${L#*-> }")" = ' 01' ]; then1823 NVM_ARCH=armv7l1824 HOST_ARCH=armv7l1825 fi
2417 unmodified lines