From ac868c9c0621296da046f5aca2cd8ce29ac2d985 Mon Sep 17 00:00:00 2001 From: Benjamin Neff Date: Fri, 29 Jun 2018 00:50:12 +0200 Subject: [PATCH] Get processor count with ruby (on linux and mac) closes #7830 --- Changelog.md | 1 + script/configure_bundler | 3 ++- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/Changelog.md b/Changelog.md index 6b17b5e6c..7160afc43 100644 --- a/Changelog.md +++ b/Changelog.md @@ -3,6 +3,7 @@ ## Refactor ## Bug fixes +* Add compatibility with macOS to `script/configure_bundler` [#7830](https://github.com/diaspora/diaspora/pull/7830) ## Features diff --git a/script/configure_bundler b/script/configure_bundler index 67e6aa055..06ab723aa 100755 --- a/script/configure_bundler +++ b/script/configure_bundler @@ -2,6 +2,7 @@ # frozen_string_literal: true require_relative "../config/bundler_helper" +require "etc" rails_env = BundlerHelper.rails_env database = BundlerHelper.database @@ -13,7 +14,7 @@ def config(option) system("#{File.join(__dir__, '../bin/bundle')} config --local #{option}") end -config("jobs #{`nproc`}") +config("jobs #{Etc.nprocessors}") config("with #{database}") if rails_env == "production"