Skip to content

Loading…

Pick the first git in case there are multiple #71

Merged
merged 1 commit into from

2 participants

@skwp

If you have multiple gits installed, such as /usr/bin/git from apple and /usr/local/bin/git from homebrew, scm_breeze will complain with an error:

scm_breeze.sh:export:16: not valid in this context: /usr/bin/git

To fix it, I just took the head -1 to ensure the first git is used. This works fine with just one git as well because head always returns the first line anyway.

@skwp skwp referenced this pull request in skwp/dotfiles
Closed

Integrate scm_breeze #215

@ndbroadbent ndbroadbent merged commit c46e165 into ndbroadbent:master

1 check passed

Details default The Travis build passed
@ndbroadbent
Owner

Great, thanks for the fix!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Commits on Nov 13, 2012
  1. @skwp
Showing with 1 addition and 1 deletion.
  1. +1 −1 lib/scm_breeze.sh
View
2 lib/scm_breeze.sh
@@ -13,7 +13,7 @@ disable_nullglob() { if [ $shell = "zsh" ]; then unsetopt NULL_GLOB; else shopt
_alias(){ alias "$@" 2> /dev/null; }
if [ $shell = "zsh" ]; then
- export GIT_BINARY=$(type -p git | sed 's/git is //')
+ export GIT_BINARY=$(type -p git | sed 's/git is //' | head -1)
else
export GIT_BINARY=$(type -P git)
fi
Something went wrong with that request. Please try again.