File tree 1 file changed +13
-11
lines changed
1 file changed +13
-11
lines changed Original file line number Diff line number Diff line change @@ -142,18 +142,20 @@ function filterAndRestart(files) {
142
142
143
143
// if there's no matches, then test to see if the changed file is the
144
144
// 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 ;
153
156
}
154
- return true ;
155
- }
156
- } )
157
+ } )
158
+ }
157
159
}
158
160
159
161
utils . log . detail ( 'changes after filters (before/after): ' +
You can’t perform that action at this time.
0 commit comments