Merge pull request #656 from DanielJackson-Oslo/informative-error-message-on-lock

Informative message on lock error
This commit is contained in:
Donal McBreen
2024-03-07 11:16:18 +00:00
committed by GitHub
2 changed files with 3 additions and 2 deletions

View File

@@ -123,8 +123,9 @@ module Kamal::Cli
yield
rescue SSHKit::Runner::ExecuteError => e
if e.message =~ /cannot create directory/
say "Deploy lock already in place!", :red
on(KAMAL.primary_host) { puts capture_with_debug(*KAMAL.lock.status) }
raise LockError, "Deploy lock found"
raise LockError, "Deploy lock found. Run 'kamal lock help' for more information"
else
raise e
end