Skip to content

Commit

Permalink
Print debug message at hook start (#377)
Browse files Browse the repository at this point in the history
  • Loading branch information
wsmd authored and typicode committed Oct 11, 2018
1 parent 09bbaa3 commit 39678b3
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 0 deletions.
8 changes: 8 additions & 0 deletions src/installer/__tests__/__snapshots__/getScript.ts.snap
Expand Up @@ -9,6 +9,10 @@ scriptPath=\\"node_modules/husky/run.js\\"
hookName=\`basename \\"$0\\"\`
gitParams=\\"$*\\"
if [[ ! -z \\"\${HUSKY_DEBUG}\\" ]]; then
echo \\"\\\\nhusky:debug $hookName hook started...\\\\n\\"
fi
if ! command -v node >/dev/null 2>&1; then
echo \\"Can't find node in PATH, trying to find a node binary on your system\\"
fi
Expand All @@ -31,6 +35,10 @@ scriptPath=\\"node_modules/husky/run.js\\"
hookName=\`basename \\"$0\\"\`
gitParams=\\"$*\\"
if [[ ! -z \\"\${HUSKY_DEBUG}\\" ]]; then
echo \\"\\\\nhusky:debug $hookName hook started...\\\\n\\"
fi
if [ -f $scriptPath ]; then
node $scriptPath $hookName \\"$gitParams\\"
else
Expand Down
4 changes: 4 additions & 0 deletions src/installer/getScript.ts
Expand Up @@ -21,6 +21,10 @@ ${huskyIdentifier}
scriptPath="${script}.js"
hookName=\`basename "$0"\`
gitParams="$*"
if [[ ! -z "$\{HUSKY_DEBUG\}" ]]; then
echo "\\nhusky:debug $hookName hook started...\\n"
fi
${
platform !== 'win32'
? `
Expand Down

0 comments on commit 39678b3

Please sign in to comment.