Skip to content

Commit

Permalink
Fix tests
Browse files Browse the repository at this point in the history
  • Loading branch information
typicode committed Mar 8, 2017
1 parent 7af95d3 commit 0bb5798
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/index.js
Expand Up @@ -119,6 +119,7 @@ function getHookScript (hookName, relativePath, cmd) {
// Can't find npm message
var npmNotFound = '> husky - Can\'t find npm in PATH. Skipping ' + cmd + ' script in package.json'

var scriptName = hookName.replace(/-/g, '')
arr = arr.concat([
// Test if npm is in PATH
'command_exists npm || {',
Expand All @@ -137,7 +138,7 @@ function getHookScript (hookName, relativePath, cmd) {
'npm run -s ' + cmd + ' || {',
' echo',
' echo "> husky - ' + hookName + ' hook failed (add --no-verify to bypass)"',
' echo "> husky - to debug, use \'npm run ' + hookName + '\'"',
' echo "> husky - to debug, use \'npm run ' + scriptName + '\'"',
' exit 1',
'}',
''
Expand Down

0 comments on commit 0bb5798

Please sign in to comment.