mirror of
https://github.com/robbyrussell/oh-my-zsh.git
synced 2025-12-06 07:20:40 +01:00
Use $OSTYPE instead of uname to speed things up
The $OSTYPE variable is set at ZSH compile time and can be safely used to determine the OS of the system. e.g. darwin (os x)
This commit is contained in:
committed by
Christian Höltje
parent
207b6a1e33
commit
63bae2aba9
@@ -54,7 +54,7 @@ bundle_install() {
|
||||
if _bundler-installed && _within-bundled-project; then
|
||||
local bundler_version=`bundle version | cut -d' ' -f3`
|
||||
if [[ $bundler_version > '1.4.0' || $bundler_version = '1.4.0' ]]; then
|
||||
if [[ "$(uname)" == 'Darwin' ]]
|
||||
if [[ "$OSTYPE" = darwin* ]]
|
||||
then
|
||||
local cores_num="$(sysctl hw.ncpu | awk '{print $2}')"
|
||||
else
|
||||
|
||||
Reference in New Issue
Block a user