Add service_version and add running hook message

This commit is contained in:
Donal McBreen
2023-05-23 10:46:17 +01:00
parent 258887a451
commit 3b695ae127
7 changed files with 26 additions and 16 deletions

View File

@@ -132,13 +132,12 @@ module Mrsk::Cli
end
def run_hook(hook, **details)
run_locally do
if MRSK.hook.hook_exists?(hook)
begin
MRSK.with_verbosity(:debug) { execute(*MRSK.hook.run(hook, **details)) }
rescue SSHKit::Command::Failed
raise HookError.new("Hook `#{hook}` failed")
end
if MRSK.hook.hook_exists?(hook)
say "Running the #{hook} hook...", :magenta
run_locally do
MRSK.with_verbosity(:debug) { execute *MRSK.hook.run(hook, **details) }
rescue SSHKit::Command::Failed
raise HookError.new("Hook `#{hook}` failed")
end
end
end