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 [[ -d "$APP_CLONE_ROOT" ]]; then
|
||||||
if [[ "$FLAG" == "--force" ]]; then
|
if [[ "$FLAG" == "--force" ]]; then
|
||||||
dokku_log_info1 "About to delete $APP_CLONE_ROOT"
|
fn-git-remove-clone-folder "$APP_CLONE_ROOT"
|
||||||
rm -rf "$APP_CLONE_ROOT"
|
|
||||||
dokku_log_info1 "Successfully unlocked $APP"
|
|
||||||
else
|
else
|
||||||
read -rp "Are you sure that want to delete clone folder (y/n)?" choice
|
read -rp "Are you sure that want to delete clone folder (y/n)?" choice
|
||||||
case "$choice" in
|
case "$choice" in
|
||||||
y | Y)
|
y | Y)
|
||||||
dokku_log_info1 "About to delete $APP_CLONE_ROOT"
|
fn-git-remove-clone-folder "$APP_CLONE_ROOT"
|
||||||
rm -rf "$APP_CLONE_ROOT"
|
|
||||||
dokku_log_info1 "Successfully unlocked $APP"
|
|
||||||
;;
|
;;
|
||||||
n | N) echo "no" ;;
|
n | N) echo "no" ;;
|
||||||
*) echo "please answer with yes or 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"
|
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() {
|
fn-git-create-hook() {
|
||||||
declare APP="$1"
|
declare APP="$1"
|
||||||
local APP_PATH="$DOKKU_ROOT/$APP"
|
local APP_PATH="$DOKKU_ROOT/$APP"
|
||||||
|
|||||||
Reference in New Issue
Block a user