Show context for lock status message on raise_if_locked

This commit is contained in:
Daniel Jackson
2024-01-23 09:17:15 +01:00
parent 1ec69d3764
commit ad04bb7556

View File

@@ -123,6 +123,7 @@ 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. Run 'kamal lock help' for more information"
else