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
[Fix] add missing local (handle nonexisting /sbin/init a bit more c…
…leanly)
  • Loading branch information
lsfxz authored and ljharb committed Nov 17, 2021
commit fb4538b360a4ddd5d390442f3bfde9b3239b4413
1 change: 1 addition & 0 deletions nvm.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down