From 7fabc8bca41d4ff7090325116a85513dac852236 Mon Sep 17 00:00:00 2001
From: Clemens Gruber <clemensgru@gmail.com>
Date: Tue, 21 Jun 2016 01:31:13 +0200
Subject: 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>
---
 plugins/bundler/bundler.plugin.zsh | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

(limited to 'plugins')

diff --git a/plugins/bundler/bundler.plugin.zsh b/plugins/bundler/bundler.plugin.zsh
index 382a1a471..c5284dbb1 100644
--- a/plugins/bundler/bundler.plugin.zsh
+++ b/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
-- 
cgit v1.2.3-70-g09d2