mirror of
https://github.com/dokku/dokku.git
synced 2026-02-24 04:00:36 +01:00
clean up remove clone folder fn
This commit is contained in:
@@ -246,16 +246,12 @@ cmd-git-unlock() {
|
||||
|
||||
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"
|
||||
fn-git-remove-clone-folder "$APP_CLONE_ROOT"
|
||||
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"
|
||||
fn-git-remove-clone-folder "$APP_CLONE_ROOT"
|
||||
;;
|
||||
n | N) echo "no" ;;
|
||||
*) echo "please answer with yes or no" ;;
|
||||
@@ -351,6 +347,13 @@ fn-git-auth-error() {
|
||||
dokku_log_fail "As an alternative, configure the netrc authentication via the git:auth command"
|
||||
}
|
||||
|
||||
fn-git-remove-clone-folder() {
|
||||
declare APP_CLONE_ROOT="$1"
|
||||
dokku_log_info1 "About to delete $APP_CLONE_ROOT"
|
||||
rm -rf "$APP_CLONE_ROOT"
|
||||
dokku_log_info1 "Successfully deleted $APP_CLONE_ROOT"
|
||||
}
|
||||
|
||||
fn-git-create-hook() {
|
||||
declare APP="$1"
|
||||
local APP_PATH="$DOKKU_ROOT/$APP"
|
||||
|
||||
Reference in New Issue
Block a user