Permalink
Browse files

bundler plugin: Simplify retrieval of cpu count on OSX (#5180)

Calling awk is not necessary here, sysctl has the -n flag to print the value.

Signed-off-by: Clemens Gruber <clemensgru@gmail.com>
  • Loading branch information...
1 parent c62442f commit 7fabc8bca41d4ff7090325116a85513dac852236 @clemensg clemensg committed with mcornella Jun 20, 2016
Showing with 1 addition and 1 deletion.
  1. +1 −1 plugins/bundler/bundler.plugin.zsh
@@ -58,7 +58,7 @@ bundle_install() {
if [[ $bundler_version > '1.4.0' || $bundler_version = '1.4.0' ]]; then
if [[ "$OSTYPE" = darwin* ]]
then
- local cores_num="$(sysctl hw.ncpu | awk '{print $2}')"
+ local cores_num="$(sysctl -n hw.ncpu)"
else
local cores_num="$(nproc)"
fi

0 comments on commit 7fabc8b

Please sign in to comment.