Skip to content
Myr

[Fix] add missing `local` (handle nonexisting /sbin/init a bit more cleanly)

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

authored by lsfxz · committed by Jordan Harband · parent d004c6b · Browse files · 1 file+1 added−0 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−0 removed

  • other:+1 added−0 removed

1 file+1 added−0 removed

modified:nvm.sh+1 added
1869 unmodified lines
1870 *) NVM_ARCH="${HOST_ARCH}" ;;1871 esac18721873 # If running a 64bit ARM kernel but a 32bit ARM userland, change ARCH to 32bit ARM (armv7l)1874 local L1875 L=$(ls -dl /sbin/init 2>/dev/null) # if /sbin/init is 32bit executable1876 if [ "$(uname)" = "Linux" ] && [ "${NVM_ARCH}" = arm64 ] && [ "$(od -An -t x1 -j 4 -N 1 "${L#*-> }")" = ' 01' ]; then1877 NVM_ARCH=armv7l1878 HOST_ARCH=armv7l
2464 unmodified lines