From 06899c42c7f49d063f2e6143edc641e95403744c Mon Sep 17 00:00:00 2001 From: Bauke Date: Tue, 1 Nov 2022 13:42:14 +0100 Subject: [PATCH] Add an explicit --config to the default hook template. --- hooked-cli/source/main.rs | 1 + hooked-cli/source/templates/default.sh | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/hooked-cli/source/main.rs b/hooked-cli/source/main.rs index a634862..2c859c4 100644 --- a/hooked-cli/source/main.rs +++ b/hooked-cli/source/main.rs @@ -45,6 +45,7 @@ fn main() -> Result<()> { for hook_type in HOOK_TYPES { let mut context = Context::new(); + context.insert("config_path", &config.general.config); context.insert("hook_type", hook_type); let hook_path = git_hooks_dir.join(hook_type); diff --git a/hooked-cli/source/templates/default.sh b/hooked-cli/source/templates/default.sh index d4338b9..b7d9d72 100644 --- a/hooked-cli/source/templates/default.sh +++ b/hooked-cli/source/templates/default.sh @@ -2,4 +2,4 @@ # Installed by Hooked. -hooked run {{ hook_type }} +hooked run {{ hook_type }} --config {{ config_path }}