From 0acbb4c6fba78e6db76a3672607b9b3a2cc7d78a Mon Sep 17 00:00:00 2001 From: Mathias Brodala Date: Wed, 5 Apr 2017 15:02:19 +0200 Subject: [PATCH] Improve lock message Prefix launcher script and append current stage. --- recipe/deploy/lock.php | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/recipe/deploy/lock.php b/recipe/deploy/lock.php index b71d3ba8..f0893436 100644 --- a/recipe/deploy/lock.php +++ b/recipe/deploy/lock.php @@ -14,9 +14,11 @@ task('deploy:lock', function () { $locked = run("if [ -f {{deploy_path}}/.dep/deploy.lock ]; then echo 'true'; fi")->toBool(); if ($locked) { + $stage = input()->hasArgument('stage') ? ' ' . input()->getArgument('stage') : ''; + throw new GracefulShutdownException( "Deploy locked.\n" . - "Run deploy:unlock command to unlock." + sprintf('Execute "dep deploy:unlock%s" to unlock.', $stage) ); } else { run("touch {{deploy_path}}/.dep/deploy.lock");