File tree Expand file tree Collapse file tree 2 files changed +5
-3
lines changed
Expand file tree Collapse file tree 2 files changed +5
-3
lines changed Original file line number Diff line number Diff line change 22
33var spawn = require ( 'cross-spawn' )
44 , shelly = require ( 'shelljs' )
5+ , which = require ( 'which' )
56 , path = require ( 'path' )
67 , util = require ( 'util' )
78 , tty = require ( 'tty' ) ;
@@ -134,7 +135,7 @@ Hook.prototype.log = function log(lines, exit) {
134135 */
135136Hook . prototype . initialize = function initialize ( ) {
136137 [ 'git' , 'npm' ] . forEach ( function each ( binary ) {
137- try { this [ binary ] = this . shelly . which ( binary ) ; }
138+ try { this [ binary ] = which . sync ( binary ) ; }
138139 catch ( e ) { }
139140 } , this ) ;
140141
@@ -145,7 +146,7 @@ Hook.prototype.initialize = function initialize() {
145146 if ( ! this . npm ) {
146147 try {
147148 process . env . PATH += path . delimiter + path . dirname ( process . env . _ ) ;
148- this . npm = this . shelly . which ( 'npm' ) ;
149+ this . npm = which . sync ( 'npm' ) ;
149150 } catch ( e ) {
150151 return this . log ( this . format ( Hook . log . binary , 'npm' ) , 0 ) ;
151152 }
Original file line number Diff line number Diff line change 3131 "license" : " MIT" ,
3232 "dependencies" : {
3333 "cross-spawn" : " 2.0.x" ,
34- "shelljs" : " 0.5.x"
34+ "shelljs" : " 0.5.x" ,
35+ "which" : " 1.1.x"
3536 },
3637 "devDependencies" : {
3738 "assume" : " 1.2.x" ,
You can’t perform that action at this time.
0 commit comments