mirror of
https://github.com/ohmyzsh/ohmyzsh.git
synced 2024-11-12 00:40:07 +00:00
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>
This commit is contained in:
parent
c62442f999
commit
7fabc8bca4
1 changed files with 1 additions and 1 deletions
|
@ -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
|
||||
|
|
Loading…
Reference in a new issue