diff options
| author | Clemens Gruber <clemensgru@gmail.com> | 2016-06-21 01:31:13 +0200 |
|---|---|---|
| committer | Marc Cornellà <marc.cornella@live.com> | 2016-06-21 01:31:13 +0200 |
| commit | 7fabc8bca41d4ff7090325116a85513dac852236 (patch) | |
| tree | 59eb3a777d592666badb9283d6409ed42f28d6dd | |
| parent | c62442f999854038e7d0911f60a4aff252913a7f (diff) | |
| download | zsh-7fabc8bca41d4ff7090325116a85513dac852236.tar.gz zsh-7fabc8bca41d4ff7090325116a85513dac852236.tar.bz2 zsh-7fabc8bca41d4ff7090325116a85513dac852236.zip | |
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>
| -rw-r--r-- | plugins/bundler/bundler.plugin.zsh | 2 |
1 files changed, 1 insertions, 1 deletions
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 |
