From 9e65360bdb2884b53fdfc45e28460f9cd8f63abe Mon Sep 17 00:00:00 2001 From: typicode Date: Wed, 12 Feb 2020 04:19:51 +0100 Subject: [PATCH] update snapshot --- src/installer/__tests__/__snapshots__/scripts.ts.snap | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/src/installer/__tests__/__snapshots__/scripts.ts.snap b/src/installer/__tests__/__snapshots__/scripts.ts.snap index a1014bd9f..904c1986a 100644 --- a/src/installer/__tests__/__snapshots__/scripts.ts.snap +++ b/src/installer/__tests__/__snapshots__/scripts.ts.snap @@ -64,7 +64,7 @@ hookIsDefined () { .huskyrc \\\\ .huskyrc.json \\\\ .huskyrc.yaml \\\\ - .huskyrc.yml \\\\ + .huskyrc.yml } huskyVersion=\\"4.2.1\\" @@ -84,7 +84,10 @@ fi debug \\"Current working directory is $(pwd)\\" # Skip fast if hookName is not defined -if ! hookIsDefined; then +# Don't skip if .huskyrc.js or .huskyrc.config.js are used as the heuristic could +# fail due to the dynamic aspect of JS. For example: +# \`\\"pre-\\" + \\"commit\\"\` or \`require('./config/hooks')\`) +if [ ! -f .huskyrc.js ] && [ ! -f .huskyrc.config.js ] && ! hookIsDefined; then debug \\"$hookName config not found, skipping hook\\" exit 0 fi