File tree Expand file tree Collapse file tree 1 file changed +5
-5
lines changed Expand file tree Collapse file tree 1 file changed +5
-5
lines changed Original file line number Diff line number Diff line change @@ -8,6 +8,11 @@ var childProcess = require('child_process'),
88 psTree = require ( 'ps-tree' ) ;
99
1010function Local ( ) {
11+ this . sanitizePath = function ( rawPath ) {
12+ var doubleQuoteIfRequired = this . windows && ! rawPath . match ( / " [ ^ " ] + " / ) ? '"' : '' ;
13+ return doubleQuoteIfRequired + rawPath + doubleQuoteIfRequired ;
14+ } ;
15+
1116 this . windows = os . platform ( ) . match ( / m s w i n | m s y s | m i n g w | c y g w i n | b c c w i n | w i n c e | e m c | w i n 3 2 / i) ;
1217 this . pid = undefined ;
1318 this . isProcessRunning = false ;
@@ -255,11 +260,6 @@ function Local(){
255260 return args ;
256261 } ;
257262
258- this . sanitizePath = function ( rawPath ) {
259- var doubleQuoteIfRequired = this . windows && ! rawPath . match ( / " [ ^ " ] + " / ) ? '"' : '' ;
260- return doubleQuoteIfRequired + rawPath + doubleQuoteIfRequired ;
261- } ;
262-
263263 this . killAllProcesses = function ( callback ) {
264264 psTree ( this . pid , ( err , children ) => {
265265 var childPids = children . map ( val => val . PID ) ;
You can’t perform that action at this time.
0 commit comments