From 0a147279428ae0d839a59ca613788e1ce21b1bfd Mon Sep 17 00:00:00 2001 From: Umberto Pepato Date: Fri, 30 Oct 2020 16:15:19 +0100 Subject: [PATCH] fix(hooks): typo in hook script template --- src/git_hooks.ts | 21 +++++++++------------ 1 file changed, 9 insertions(+), 12 deletions(-) diff --git a/src/git_hooks.ts b/src/git_hooks.ts index 6aa50b6..47929c9 100644 --- a/src/git_hooks.ts +++ b/src/git_hooks.ts @@ -1,14 +1,10 @@ -import { - writeFileStrSync, - existsSync, - path, -} from "../deps.ts"; -import { - ScriptsConfiguration, - isScriptObject, -} from "./scripts_config.ts"; +import { blue, existsSync, path } from "../deps.ts"; +import { isScriptObject, spawn } from "./util.ts"; +import { version } from "./version.ts"; +import { VR_HOOKS, VR_MARK } from "./consts.ts"; +import { ConfigData } from "./load_config.ts"; -const hooks = [ +export const hooks = [ "applypatch-msg", "pre-applypatch", "post-applypatch", @@ -29,8 +25,9 @@ const hooks = [ ]; function hookScript(hook: string): string { - return `!/bin/sh -vr --git-hook=${hook} "$@" + return `#!/bin/sh +# ${VR_MARK} ${version} +vr run-hook ${hook} "$@" `; }