mirror of
https://github.com/asdf-vm/asdf.git
synced 2024-11-15 01:28:17 -07:00
Avoid error when sysctl is missing hw.ncpu key
This commit is contained in:
parent
27bee2fbce
commit
887de73b79
@ -15,7 +15,7 @@ install_command() {
|
||||
get_concurrency() {
|
||||
if which nproc > /dev/null 2>&1; then
|
||||
echo $(nproc)
|
||||
elif which sysctl > /dev/null 2>&1; then
|
||||
elif which sysctl > /dev/null 2>&1 && sysctl hw.ncpu > /dev/null 2>&1; then
|
||||
echo $(sysctl -n hw.ncpu)
|
||||
elif [ -f /proc/cpuinfo ]; then
|
||||
echo $(grep -c processor /proc/cpuinfo)
|
||||
|
Loading…
Reference in New Issue
Block a user