Files
kamal/lib/mrsk/commands/hook.rb
2023-05-23 13:55:04 +01:00

15 lines
290 B
Ruby

class Mrsk::Commands::Hook < Mrsk::Commands::Base
def run(hook, **details)
[ hook_file(hook), env: tags(**details).env ]
end
def hook_exists?(hook)
Pathname.new(hook_file(hook)).exist?
end
private
def hook_file(hook)
"#{config.hooks_path}/#{hook}"
end
end