File tree Expand file tree Collapse file tree 1 file changed +13
-11
lines changed Expand file tree Collapse file tree 1 file changed +13
-11
lines changed Original file line number Diff line number Diff line change @@ -142,18 +142,20 @@ function filterAndRestart(files) {
142142
143143 // if there's no matches, then test to see if the changed file is the
144144 // running script, if so, let's allow a restart
145- const script = path . resolve ( config . options . execOptions . script ) ;
146- if ( matched . result . length === 0 && script ) {
147- const length = script . length ;
148- files . find ( file => {
149- if ( file . substr ( - length , length ) === script ) {
150- matched = {
151- result : [ file ] ,
152- total : 1 ,
145+ if ( config . options . execOptions . script ) {
146+ const script = path . resolve ( config . options . execOptions . script ) ;
147+ if ( matched . result . length === 0 && script ) {
148+ const length = script . length ;
149+ files . find ( file => {
150+ if ( file . substr ( - length , length ) === script ) {
151+ matched = {
152+ result : [ file ] ,
153+ total : 1 ,
154+ }
155+ return true ;
153156 }
154- return true ;
155- }
156- } )
157+ } )
158+ }
157159 }
158160
159161 utils . log . detail ( 'changes after filters (before/after): ' +
You can’t perform that action at this time.
0 commit comments