Get lock status by executing directly
Getting the lock status with invoke passes through any options from the original command which will raise an exception if they are not also valid for the lock status command. Fixes https://github.com/mrsked/mrsk/issues/239
This commit is contained in:
@@ -105,7 +105,7 @@ module Mrsk::Cli
|
||||
MRSK.holding_lock = true
|
||||
rescue SSHKit::Runner::ExecuteError => e
|
||||
if e.message =~ /cannot create directory/
|
||||
invoke "mrsk:cli:lock:status", []
|
||||
on(MRSK.primary_host) { execute *MRSK.lock.status }
|
||||
raise LockError, "Deploy lock found"
|
||||
else
|
||||
raise e
|
||||
|
||||
Reference in New Issue
Block a user