@@ -1777,28 +1777,28 @@ nvm_get_make_jobs() {
1777
1777
fi
1778
1778
local NVM_OS
1779
1779
NVM_OS=" $( nvm_get_os) "
1780
- local NVM_CPU_THREADS
1780
+ local NVM_CPU_CORES
1781
1781
if [ " _$NVM_OS " = " _linux" ]; then
1782
- NVM_CPU_THREADS =" $( nvm_grep -c -E ' ^processor.+: [0-9]+' /proc/cpuinfo) "
1782
+ NVM_CPU_CORES =" $( nvm_grep -c -E ' ^processor.+: [0-9]+' /proc/cpuinfo) "
1783
1783
elif [ " _$NVM_OS " = " _freebsd" ] || [ " _$NVM_OS " = " _darwin" ]; then
1784
- NVM_CPU_THREADS =" $( sysctl -n hw.ncpu) "
1784
+ NVM_CPU_CORES =" $( sysctl -n hw.ncpu) "
1785
1785
elif [ " _$NVM_OS " = " _sunos" ]; then
1786
- NVM_CPU_THREADS =" $( psrinfo | wc -l) "
1786
+ NVM_CPU_CORES =" $( psrinfo | wc -l) "
1787
1787
elif [ " _$NVM_OS " = " _aix" ]; then
1788
- NVM_CPU_THREADS =" $( lsconf | command grep ' Number Of Processors:' | command awk ' {print $4}' ) "
1788
+ NVM_CPU_CORES =" $( lsconf | command grep ' Number Of Processors:' | command awk ' {print $4}' ) "
1789
1789
fi
1790
- if ! nvm_is_natural_num " $NVM_CPU_THREADS " ; then
1791
- nvm_err ' Can not determine how many thread (s) we can use, set to only 1 now .'
1792
- nvm_err ' Please report an issue on GitHub to help us make it better and run it faster on your computer!'
1790
+ if ! nvm_is_natural_num " $NVM_CPU_CORES " ; then
1791
+ nvm_err ' Can not determine how many core (s) are available, running in single-threaded mode .'
1792
+ nvm_err ' Please report an issue on GitHub to help us make nvm run faster on your computer!'
1793
1793
NVM_MAKE_JOBS=1
1794
1794
else
1795
- nvm_echo " Detected that you have $NVM_CPU_THREADS CPU thread (s)"
1796
- if [ " $NVM_CPU_THREADS " -gt 2 ]; then
1797
- NVM_MAKE_JOBS=$(( NVM_CPU_THREADS - 1 ))
1798
- nvm_echo " Set the number of jobs to $NVM_CPU_THREADS - 1 = $ NVM_MAKE_JOBS jobs to speed up the build"
1795
+ nvm_echo " Detected that you have $NVM_CPU_CORES CPU core (s)"
1796
+ if [ " $NVM_CPU_CORES " -gt 2 ]; then
1797
+ NVM_MAKE_JOBS=$(( NVM_CPU_CORES - 1 ))
1798
+ nvm_echo " Running with $ NVM_MAKE_JOBS threads to speed up the build"
1799
1799
else
1800
1800
NVM_MAKE_JOBS=1
1801
- nvm_echo ' Number of CPU thread (s) less or equal to 2 will have only one job a time for `make` '
1801
+ nvm_echo ' Number of CPU core (s) less than or equal to 2, running in single-threaded mode '
1802
1802
fi
1803
1803
fi
1804
1804
}
@@ -1850,7 +1850,7 @@ nvm_install_source() {
1850
1850
make=' make'
1851
1851
if [ " ${NVM_OS} " = ' freebsd' ]; then
1852
1852
make=' gmake'
1853
- MAKE_CXX=' CXX=c++'
1853
+ MAKE_CXX=' CXX=c++'
1854
1854
elif [ " ${NVM_OS} " = ' aix' ]; then
1855
1855
make=' gmake'
1856
1856
fi
0 commit comments