Use double-square brackets in if test

This commit is contained in:
Jose Diaz-Gonzalez committed 2015-01-16 16:57:26 -05:00
1 parent d8fa69c5f4
commit 7f99fcb844
1 file changed
+1 -1
+1 -1
View File
@@ -4,7 +4,7 @@ set -eo pipefail; [[ $DOKKU_TRACE ]] && set -x
if [[ ! -z $DOKKU_HOST ]]; then if [[ ! -z $DOKKU_HOST ]]; then
function _dokku { function _dokku {
appname="" appname=""
if [ -d .git ] || git rev-parse --git-dir > /dev/null 2>&1; then if [[ -d .git ]] || git rev-parse --git-dir > /dev/null 2>&1; then
set +e set +e
appname=$(git remote -v 2>/dev/null | grep -Ei "^dokku" | head -n 1 | cut -f1 -d' ' | cut -f2 -d':' 2>/dev/null) appname=$(git remote -v 2>/dev/null | grep -Ei "^dokku" | head -n 1 | cut -f1 -d' ' | cut -f2 -d':' 2>/dev/null)
set -e set -e