From 397e7f05c34c7a9065a10dcc8384c886176482ee Mon Sep 17 00:00:00 2001 From: RainMeoCat <52567247+RainMeoCat@users.noreply.github.com> Date: Tue, 20 Aug 2024 20:34:33 +0800 Subject: [PATCH] fixes #1494 support pre-merge-commit hook --- index.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/index.js b/index.js index 5f11b648f..bebf0d50d 100644 --- a/index.js +++ b/index.js @@ -2,7 +2,7 @@ import c from 'child_process' import f, { readdir, writeFileSync as w } from 'fs' import p from 'path' -let l = [ 'pre-commit', 'prepare-commit-msg', 'commit-msg', 'post-commit', 'applypatch-msg', 'pre-applypatch', 'post-applypatch', 'pre-rebase', 'post-rewrite', 'post-checkout', 'post-merge', 'pre-push', 'pre-auto-gc' ], +let l = [ 'pre-commit', 'pre-merge-commit', 'prepare-commit-msg', 'commit-msg', 'post-commit', 'applypatch-msg', 'pre-applypatch', 'post-applypatch', 'pre-rebase', 'post-rewrite', 'post-checkout', 'post-merge', 'pre-push', 'pre-auto-gc' ], msg = `echo "husky - DEPRECATED\n\nPlease remove the following two lines from $0:\n\n#!/usr/bin/env sh\n. \\"\\$(dirname -- \\"\\$0\\")/_/husky.sh\\"\n\nThey WILL FAIL in v10.0.0\n"` export default (d = '.husky') => { @@ -22,4 +22,4 @@ export default (d = '.husky') => { l.forEach(h => w(_(h), `#!/usr/bin/env sh\n. "\$(dirname "\$0")/h"`, { mode: 0o755 })) w(_('husky.sh'), msg) return '' -} \ No newline at end of file +}