Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions nvm.sh
Original file line number Diff line number Diff line change
Expand Up @@ -1917,10 +1917,10 @@ nvm_get_arch() {

# If running a 64bit ARM kernel but a 32bit ARM userland,
# change ARCH to 32bit ARM (armv7l) if /sbin/init is 32bit executable
local L
if [ "$(uname)" = "Linux" ] && [ "${NVM_ARCH}" = arm64 ] &&
L="$(command ls -dl /sbin/init 2>/dev/null)" &&
[ "$(od -An -t x1 -j 4 -N 1 "${L#*-> }")" = ' 01' ]; then
if [ "$(uname)" = "Linux" ] \
&& [ "${NVM_ARCH}" = arm64 ] \
&& [ "$(command od -An -t x1 -j 4 -N 1 "/sbin/init" 2>/dev/null)" = ' 01' ]\
; then
NVM_ARCH=armv7l
HOST_ARCH=armv7l
fi
Expand Down