be5bff2e86872c00536191265aa9fdef225af100

Author
Marc Cornellà <marc.cornella@live.com>
Committer
GitHub <noreply@github.com>
Date

Message

Allow FreeBSD to correctly detect number of CPUs

Use the same scheme as Darwin - sysctl instead of nproc, which doesn't exist in FreeBSD

Closes #2545

Co-authored-by: Daniel Bye <dbye@users.noreply.github.com>

Diff

 1diff --git a/plugins/bundler/bundler.plugin.zsh b/plugins/bundler/bundler.plugin.zsh
 2index 6b10b78d1b40208dc460102de6bec771a3fbabe7..ea199d09ad53a44b2d00c52ab821768632982628 100644
 3--- a/plugins/bundler/bundler.plugin.zsh
 4+++ b/plugins/bundler/bundler.plugin.zsh
 5@@ -57,7 +57,7 @@ bundle_install() {
 6   if _bundler-installed && _within-bundled-project; then
 7     local bundler_version=`bundle version | cut -d' ' -f3`
 8     if [[ $bundler_version > '1.4.0' || $bundler_version = '1.4.0' ]]; then
 9-      if [[ "$OSTYPE" = darwin* ]]
10+      if [[ "$OSTYPE" = (darwin|freebsd)* ]]
11       then
12         local cores_num="$(sysctl -n hw.ncpu)"
13       else