From 888f45254a9b0fac4c42de28ed737478da11344f Mon Sep 17 00:00:00 2001 From: arturs Date: Thu, 11 Mar 2021 17:59:46 +0200 Subject: [PATCH] fix shfmt --- plugins/git/internal-functions | 30 ++++++++++++++++-------------- tests/unit/git_6.bats | 1 - 2 files changed, 16 insertions(+), 15 deletions(-) diff --git a/plugins/git/internal-functions b/plugins/git/internal-functions index 7b3a10d1c..f78eaa889 100755 --- a/plugins/git/internal-functions +++ b/plugins/git/internal-functions @@ -245,20 +245,22 @@ cmd-git-unlock() { local APP_CLONE_ROOT="$DOKKU_LIB_ROOT/data/git/$APP" if [[ -d "$APP_CLONE_ROOT" ]]; then - if [[ "$FLAG" == "--force" ]]; then - dokku_log_info1 "About to delete $APP_CLONE_ROOT" - rm -rf "$APP_CLONE_ROOT" - dokku_log_info1 "Successfully unlocked $APP" - else - read -rp "Are you sure that want to delete clone folder (y/n)?" choice - case "$choice" in - y|Y ) dokku_log_info1 "About to delete $APP_CLONE_ROOT" - rm -rf "$APP_CLONE_ROOT" - dokku_log_info1 "Successfully unlocked $APP";; - n|N ) echo "no";; - * ) echo "please answer with yes or no";; - esac - fi + if [[ "$FLAG" == "--force" ]]; then + dokku_log_info1 "About to delete $APP_CLONE_ROOT" + rm -rf "$APP_CLONE_ROOT" + dokku_log_info1 "Successfully unlocked $APP" + else + read -rp "Are you sure that want to delete clone folder (y/n)?" choice + case "$choice" in + y | Y) + dokku_log_info1 "About to delete $APP_CLONE_ROOT" + rm -rf "$APP_CLONE_ROOT" + dokku_log_info1 "Successfully unlocked $APP" + ;; + n | N) echo "no" ;; + *) echo "please answer with yes or no" ;; + esac + fi else dokku_log_info1 "No clone folder exists app already unlocked" fi diff --git a/tests/unit/git_6.bats b/tests/unit/git_6.bats index 47b41bc11..20e83d1cc 100644 --- a/tests/unit/git_6.bats +++ b/tests/unit/git_6.bats @@ -8,7 +8,6 @@ setup() { touch /home/dokku/.ssh/known_hosts chown dokku:dokku /home/dokku/.ssh/known_hosts touch /home/dokku/data/git/$TEST_APP - } teardown() {