mirror of
https://github.com/nvm-sh/nvm.git
synced 2025-05-10 14:21:50 +00:00
[Fix] add missing local
(handle nonexisting /sbin/init a bit more cleanly)
This commit is contained in:
parent
d004c6b064
commit
fb4538b360
1
nvm.sh
1
nvm.sh
@ -1871,6 +1871,7 @@ nvm_get_arch() {
|
||||
esac
|
||||
|
||||
# If running a 64bit ARM kernel but a 32bit ARM userland, change ARCH to 32bit ARM (armv7l)
|
||||
local L
|
||||
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
|
||||
|
Loading…
Reference in New Issue
Block a user