From 99bc51f106cd39fc82b39166a1d40643103de178 Mon Sep 17 00:00:00 2001 From: arturs Date: Wed, 10 Mar 2021 19:29:23 +0200 Subject: [PATCH] fix unlock command --- plugins/git/internal-functions | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/plugins/git/internal-functions b/plugins/git/internal-functions index d571b185e..66ebdb20b 100755 --- a/plugins/git/internal-functions +++ b/plugins/git/internal-functions @@ -201,7 +201,7 @@ cmd-git-sync() { exit 15 fi else - dokku_log_fail "Missing tty, try running ssh -t which will allocate new tty for you" + dokku_log_fail "Missing tty, please run git:unlock command" fi else dokku_log_info1 "No need to unlock app, carrying on with build" @@ -233,20 +233,21 @@ cmd-git-unlock() { declare desc="removes the clone folder for an app" local cmd="git:unlock" [[ "$1" == "$cmd" ]] && shift 1 - declare APP - - APP="${ARGS[0]}" + declare APP="$1" local APP_CLONE_ROOT="$DOKKU_LIB_ROOT/data/git/$APP" if [[ -d "$APP_CLONE_ROOT" ]]; then dokku_log_info1 "About to delete $APP_CLONE_ROOT" + chown dokku:dokku -R "$APP_CLONE_ROOT" + chmod 755 "$APP_CLONE_ROOT" rm -rf "$APP_CLONE_ROOT" + dokku_log_info1 "Successfully unlocked $APP" else dokku_log_info1 "No clone folder exists app already unlocked" fi - dokku_log_info1 "Successfully unlocked $APP" + } cmd-git-public-key() {