Add configuration for hooks_path

This commit is contained in:
Donal McBreen
2023-05-22 11:09:13 +01:00
parent f3ec9f19c8
commit 910f14e9c0
4 changed files with 21 additions and 5 deletions

View File

@@ -1,6 +1,6 @@
class Mrsk::Commands::Hook < Mrsk::Commands::Base
def run(hook, **details)
[ ".mrsk/hooks/#{hook}", env: tags(**details).env ]
[ hook_file(hook), env: tags(**details).env ]
end
def hook_exists?(hook)
@@ -9,6 +9,6 @@ class Mrsk::Commands::Hook < Mrsk::Commands::Base
private
def hook_file(hook)
".mrsk/hooks/#{hook}"
"#{config.hooks_path}/#{hook}"
end
end