Commit 6d6725a8 authored by Kjetil Limkjær's avatar Kjetil Limkjær
Browse files

Fix rbenv install on Solaris / Illumos

rbenv install crashes on Solaris with an empty log file. Adding support
for the proper Solaris getconf call in num_cpu_cores fixed it. Tested
and working under OmniOS CE r151024.
parent 81a4cd64
Loading
Loading
Loading
Loading
+3 −0
Original line number Diff line number Diff line
@@ -153,6 +153,9 @@ num_cpu_cores() {
  Darwin | *BSD )
    num="$(sysctl -n hw.ncpu 2>/dev/null || true)"
    ;;
  SunOS )
    num="$(getconf NPROCESSORS_ONLN 2>/dev/null || true)"
    ;;
  * )
    num="$({ getconf _NPROCESSORS_ONLN ||
             grep -c ^processor /proc/cpuinfo; } 2>/dev/null)"