mirror of
https://github.com/nvm-sh/nvm.git
synced 2025-05-10 22:31:51 +00:00
[New] Add one more NVM_OS - alpine_linux
This commit is contained in:
parent
45771499ee
commit
423f420884
10
nvm.sh
10
nvm.sh
@ -1443,7 +1443,13 @@ nvm_get_os() {
|
||||
NVM_UNAME="$(command uname -a)"
|
||||
local NVM_OS
|
||||
case "$NVM_UNAME" in
|
||||
Linux\ *) NVM_OS=linux ;;
|
||||
Linux\ *)
|
||||
if [ -f "/etc/alpine-release" ]; then
|
||||
NVM_OS=alpine_linux
|
||||
else
|
||||
NVM_OS=linux
|
||||
fi
|
||||
;;
|
||||
Darwin\ *) NVM_OS=darwin ;;
|
||||
SunOS\ *) NVM_OS=sunos ;;
|
||||
FreeBSD\ *) NVM_OS=freebsd ;;
|
||||
@ -1779,7 +1785,7 @@ nvm_get_make_jobs() {
|
||||
NVM_OS="$(nvm_get_os)"
|
||||
local NVM_CPU_CORES
|
||||
case "_$NVM_OS" in
|
||||
"_linux")
|
||||
'_linux' | '_alpine_linux')
|
||||
NVM_CPU_CORES="$(nvm_grep -c -E '^processor.+: [0-9]+' /proc/cpuinfo)"
|
||||
;;
|
||||
"_freebsd" | "_darwin")
|
||||
|
Loading…
Reference in New Issue
Block a user