From b7c71558522d840056ce4455ce34d21c83e640eb Mon Sep 17 00:00:00 2001 From: Jose Diaz-Gonzalez Date: Tue, 5 Oct 2021 13:18:19 -0400 Subject: [PATCH] fix: choose the correct app when a named remote is specified in the remote ssh client Closes #4838 --- contrib/dokku_client.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/contrib/dokku_client.sh b/contrib/dokku_client.sh index bd7fdd583..8b4aacc6f 100755 --- a/contrib/dokku_client.sh +++ b/contrib/dokku_client.sh @@ -104,7 +104,7 @@ main() { if [[ -z "$APP" ]]; then if [[ -d .git ]] || git rev-parse --git-dir >/dev/null 2>&1; then set +e - APP=$(git remote -v 2>/dev/null | grep -Ei "dokku@$DOKKU_REMOTE_HOST" | head -n 1 | cut -f2 -d'@' | cut -f1 -d' ' | cut -f2 -d':' 2>/dev/null) + APP=$(git remote -v 2>/dev/null | grep -Ei "^${DOKKU_GIT_REMOTE}\s" | grep -Ei "dokku@$DOKKU_REMOTE_HOST" | head -n 1 | cut -f2 -d'@' | cut -f1 -d' ' | cut -f2 -d':' 2>/dev/null) set -e else echo " ! This is not a git repository" 1>&2