mirror of
https://github.com/nvm-sh/nvm.git
synced 2026-04-03 11:34:50 +08:00
[Fix] nvm_get_arch: add command prefix to uname call
Other `uname` calls in the file use `command uname` to bypass any user aliases or functions.
This one was missing it.
Bug introduced in 779a34e6a9 / #2469.
This commit is contained in:
2
nvm.sh
2
nvm.sh
@@ -2162,7 +2162,7 @@ nvm_get_arch() {
|
|||||||
|
|
||||||
# If running a 64bit ARM kernel but a 32bit ARM userland,
|
# If running a 64bit ARM kernel but a 32bit ARM userland,
|
||||||
# change ARCH to 32bit ARM (armv7l) if /sbin/init is 32bit executable
|
# change ARCH to 32bit ARM (armv7l) if /sbin/init is 32bit executable
|
||||||
if [ "$(uname)" = "Linux" ] \
|
if [ "$(command uname)" = "Linux" ] \
|
||||||
&& [ "${NVM_ARCH}" = arm64 ] \
|
&& [ "${NVM_ARCH}" = arm64 ] \
|
||||||
&& [ "$(command od -An -t x1 -j 4 -N 1 "/sbin/init" 2>/dev/null)" = ' 01' ]\
|
&& [ "$(command od -An -t x1 -j 4 -N 1 "/sbin/init" 2>/dev/null)" = ' 01' ]\
|
||||||
; then
|
; then
|
||||||
|
|||||||
Reference in New Issue
Block a user