Skip to content

Commit

Permalink
Prefer nvm over Node global install
Browse files Browse the repository at this point in the history
  • Loading branch information
typicode committed Mar 12, 2017
1 parent 652c7f0 commit a2da709
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/index.js
Expand Up @@ -86,7 +86,7 @@ function getHookScript (hookName, relativePath, cmd) {

if (process.platform === 'darwin') {
// Add
// Brew standard installation path /use/local/bin
// Brew standard installation path /usr/local/bin
// Node standard installation path /usr/local
// for GUI apps
// https://github.com/typicode/husky/issues/49
Expand All @@ -97,13 +97,13 @@ function getHookScript (hookName, relativePath, cmd) {

if (process.platform === 'darwin') {
arr = arr.concat([
'command_exists npm || load_nvm BREW_NVM_DIR /usr/local/opt/nvm',
'load_nvm BREW_NVM_DIR /usr/local/opt/nvm',
''
])
}

arr = arr.concat([
'command_exists npm || load_nvm NVM_DIR ' + home + '/.nvm',
'load_nvm NVM_DIR ' + home + '/.nvm',
''
])
} else {
Expand Down

0 comments on commit a2da709

Please sign in to comment.