Skip to content

Commit

Permalink
Update
Browse files Browse the repository at this point in the history
  • Loading branch information
typicode committed Jan 16, 2017
1 parent 2f70374 commit cb50cae
Show file tree
Hide file tree
Showing 5 changed files with 14 additions and 6 deletions.
5 changes: 5 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,10 @@
# CHANGELOG

## Unreleased

* Make `husky` a little less verbose
* Fix issue with `OS X + brew` where `nvm` was loaded even when `npm` was already present

## 0.12.0

* Adds Git submodule support
Expand Down
5 changes: 3 additions & 2 deletions bin/install.js
Original file line number Diff line number Diff line change
@@ -1,15 +1,16 @@
// Run when package is installed
var path = require('path')
var chalk = require('chalk')
var isCI = require('is-ci')
var husky = require('../src/')

console.log(chalk.cyan.underline('husky'))

if (isCI) {
console.log('\\033[4;36m%s\\033[0m', 'husky')
console.log('CI detected, skipping Git hooks installation')
process.exit(0)
}

console.log('\\033[4;36m%s\\033[0m', 'husky')
console.log('setting up hooks')

var huskyDir = path.join(__dirname, '..')
Expand Down
3 changes: 2 additions & 1 deletion bin/uninstall.js
Original file line number Diff line number Diff line change
@@ -1,8 +1,9 @@
// Run when package is uninstalled
var path = require('path')
var chalk = require('chalk')
var husky = require('../src/')

console.log('\\033[4;36m%s\\033[0m', 'husky')
console.log(chalk.cyan.underline('husky'))
console.log('uninstalling')

var huskyDir = path.join(__dirname, '..')
Expand Down
1 change: 1 addition & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,7 @@
"standard": "^8.6.0"
},
"dependencies": {
"chalk": "^1.1.3",
"find-parent-dir": "^0.3.0",
"is-ci": "^1.0.9",
"normalize-path": "^1.0.0"
Expand Down
6 changes: 3 additions & 3 deletions src/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -111,7 +111,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 npmNotFound = '> husky - Can\'t find npm in PATH. Skipping ' + cmd + ' script in package.json'

arr = arr.concat([
// Test if npm is in PATH
Expand All @@ -130,8 +130,8 @@ function getHookScript (hookName, relativePath, cmd) {
'export GIT_PARAMS="$*"',
'npm run -s ' + cmd + ' || {',
' echo',
' echo "husky > ' + hookName + ' hook failed (add --no-verify to bypass)"',
' echo "husky > To debug, use \'npm run precommit\'',
' echo "> husky - ' + hookName + ' hook failed (add --no-verify to bypass)"',
' echo "> husky - To debug, use \'npm run precommit\'',
' exit 1',
'}',
''
Expand Down

0 comments on commit cb50cae

Please sign in to comment.