Merge pull request #1613 from nwinkler/svn-xcode-no-longer-provided

Add check for broken XCode SVN command
pull/1618/head
Nils Winkler 2020-06-15 08:44:33 +02:00 committed by GitHub
commit ecd58894f7
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 13 additions and 4 deletions

View File

@ -83,10 +83,19 @@ RBENV_THEME_PROMPT_SUFFIX='|'
RBFU_THEME_PROMPT_PREFIX=' |'
RBFU_THEME_PROMPT_SUFFIX='|'
GIT_EXE=`which git 2> /dev/null || true`
P4_EXE=`which p4 2> /dev/null || true`
HG_EXE=`which hg 2> /dev/null || true`
SVN_EXE=`which svn 2> /dev/null || true`
GIT_EXE=$(which git 2> /dev/null || true)
P4_EXE=$(which p4 2> /dev/null || true)
HG_EXE=$(which hg 2> /dev/null || true)
SVN_EXE=$(which svn 2> /dev/null || true)
# Check for broken SVN exe that is caused by some versions of Xcode.
# See https://github.com/Bash-it/bash-it/issues/1612 for more details.
if [[ -x "$SVN_EXE" ]] ; then
if ! "$SVN_EXE" --version > /dev/null 2>&1 ; then
# Unset the SVN exe variable so that SVN commands are avoided.
SVN_EXE=""
fi
fi
function scm {
if [[ "$SCM_CHECK" = false ]]; then SCM=$SCM_NONE