From 79789642a90b2c1d1d4295f212358276ce071bc7 Mon Sep 17 00:00:00 2001 From: Denys Havrysh Date: Tue, 22 Dec 2015 16:40:29 +0200 Subject: [PATCH] Fix git invocation fail when `man` command is not available --- bootstrap-salt.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/bootstrap-salt.sh b/bootstrap-salt.sh index 3820862..bf5edc0 100755 --- a/bootstrap-salt.sh +++ b/bootstrap-salt.sh @@ -1291,7 +1291,7 @@ __git_clone_and_checkout() { # Let's try shallow cloning to speed up. # Test for "--single-branch" option introduced in git 1.7.10, the minimal version of git where the shallow # cloning we need actually works - if [ "$(git clone --help | grep 'single-branch')" != "" ]; then + if [ "$(git clone 2>&1 | grep 'single-branch')" != "" ]; then # The "--single-branch" option is supported, attempt shallow cloning echoinfo "Attempting to shallow clone $GIT_REV from Salt's repository ${_SALT_REPO_URL}" git clone --depth 1 --branch "$GIT_REV" "$_SALT_REPO_URL" "$__SALT_CHECKOUT_REPONAME"