diff --git a/plugins/apps/functions.go b/plugins/apps/functions.go index 0b59d5744..3c42cd3d5 100644 --- a/plugins/apps/functions.go +++ b/plugins/apps/functions.go @@ -96,7 +96,7 @@ func destroyApp(appName string) error { // returns the lock path func getLockPath(appName string) string { - return fmt.Sprintf("%v/.deploy.lock", common.GetDataDirectory(appName)) + return fmt.Sprintf("%v/.deploy.lock", common.GetAppDataDirectory("apps", appName)) } // creates an app if allowed diff --git a/plugins/common/functions b/plugins/common/functions index 6d16919a3..388e12470 100755 --- a/plugins/common/functions +++ b/plugins/common/functions @@ -437,19 +437,19 @@ parse_args() { fi case "$arg" in - --quiet) - export DOKKU_QUIET_OUTPUT=1 - ;; - --trace) - export DOKKU_TRACE=1 - ;; - --force) - export DOKKU_APPS_FORCE_DELETE=1 - ;; - --app) - export DOKKU_APP_NAME=${args[$next_index]} - skip=true - ;; + --quiet) + export DOKKU_QUIET_OUTPUT=1 + ;; + --trace) + export DOKKU_TRACE=1 + ;; + --force) + export DOKKU_APPS_FORCE_DELETE=1 + ;; + --app) + export DOKKU_APP_NAME=${args[$next_index]} + skip=true + ;; esac if [[ "$skip" == "true" ]]; then @@ -929,7 +929,7 @@ acquire_app_deploy_lock() { declare desc="acquire advisory lock for use in deploys" local APP="$1" local LOCK_TYPE="${2:-waiting}" - local APP_DEPLOY_LOCK_FILE="$DOKKU_LIB_ROOT/data/$APP/.deploy.lock" + local APP_DEPLOY_LOCK_FILE="$DOKKU_LIB_ROOT/data/apps/$APP/.deploy.lock" local LOCK_WAITING_MSG="$APP currently has a deploy lock in place. Waiting..." local LOCK_FAILED_MSG="$APP currently has a deploy lock in place. Exiting..." @@ -939,7 +939,7 @@ acquire_app_deploy_lock() { release_app_deploy_lock() { declare desc="release advisory lock used in deploys" local APP="$1" - local APP_DEPLOY_LOCK_FILE="$DOKKU_LIB_ROOT/data/$APP/.deploy.lock" + local APP_DEPLOY_LOCK_FILE="$DOKKU_LIB_ROOT/data/apps/$APP/.deploy.lock" release_advisory_lock "$APP_DEPLOY_LOCK_FILE" }