diff options
| author | Mike McQuaid | 2016-10-16 15:45:18 +0100 |
|---|---|---|
| committer | GitHub | 2016-10-16 15:45:18 +0100 |
| commit | 2a18378a035c7a87d97d1deb742c0f7debb89847 (patch) | |
| tree | 855493307ea304361e4c1062eadd3178d1efb086 /Library | |
| parent | 560bea67683e0ad36735e2678348f6e0626bd05e (diff) | |
| parent | 7292ad1f1a1f8f92bac9160b6be6c4a64ac24d5c (diff) | |
| download | brew-2a18378a035c7a87d97d1deb742c0f7debb89847.tar.bz2 | |
Merge pull request #1303 from MikeMcQuaid/old-osx-git-shim
shims/scm/git: fix on old OS X versions.
Diffstat (limited to 'Library')
| -rwxr-xr-x | Library/Homebrew/shims/scm/git | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/Library/Homebrew/shims/scm/git b/Library/Homebrew/shims/scm/git index eedca486b..96209df23 100755 --- a/Library/Homebrew/shims/scm/git +++ b/Library/Homebrew/shims/scm/git @@ -111,7 +111,15 @@ then # /usr/bin/<tool> will be a popup stub under such configuration. # xcrun hangs if xcode-select is set to "/" xcode_path="$(/usr/bin/xcode-select -print-path 2>/dev/null)" - [[ -n "$xcode_path" ]] || popup_stub=1 + if [[ -z "$xcode_path" ]] + then + macos_version="$(/usr/bin/sw_vers -productVersion)" + printf -v macos_version_numeric "%02d%02d%02d" ${macos_version//./ } + if [[ "$macos_version_numeric" -ge "100900" ]] + then + unset popup_stub=1 + fi + fi if [[ -z "$popup_stub" && "$xcode_path" != "/" ]] then path="$(/usr/bin/xcrun -find "$SCM_FILE" 2>/dev/null)" |
