From 26a3a8fd0a1b56546ec3b7cc5d662790d34edaf0 Mon Sep 17 00:00:00 2001 From: Jose Diaz-Gonzalez Date: Sun, 11 Jul 2021 21:33:32 -0400 Subject: [PATCH] feat: output message explaining how to remove a deploy lock when a lock is encountered --- plugins/common/functions | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/plugins/common/functions b/plugins/common/functions index df6ed38c6..01353900a 100755 --- a/plugins/common/functions +++ b/plugins/common/functions @@ -1106,7 +1106,10 @@ acquire_advisory_lock() { sleep 1 done else - flock -n "$LOCK_FD" &>/dev/null || dokku_log_fail "$LOCK_FAILED_MSG" + if ! flock -n "$LOCK_FD" &>/dev/null; then + dokku_log_warn "$LOCK_FAILED_MSG" + dokku_log_fail "Run 'apps:unlock' to release the existing deploy lock" + fi fi }