File tree Expand file tree Collapse file tree 1 file changed +13
-13
lines changed
packages/gatsby/src/commands Expand file tree Collapse file tree 1 file changed +13
-13
lines changed Original file line number Diff line number Diff line change @@ -126,21 +126,21 @@ class ControllableScript {
126126 }
127127
128128 this . isRunning = false
129- if ( signal ) {
130- try {
129+ try {
130+ if ( signal ) {
131131 this . process . kill ( signal )
132- } catch ( err ) {
133- // Ignore error if process has crashed
134- // Ref: https://github.com/gatsbyjs/gatsby/issues/28011#issuecomment-877302917
132+ } else {
133+ this . process . send ( {
134+ type : `COMMAND` ,
135+ action : {
136+ type : `EXIT` ,
137+ payload : code ,
138+ } ,
139+ } )
135140 }
136- } else {
137- this . process . send ( {
138- type : `COMMAND` ,
139- action : {
140- type : `EXIT` ,
141- payload : code ,
142- } ,
143- } )
141+ } catch ( err ) {
142+ // Ignore error if process has crashed or already quit.
143+ // Ref: https://github.com/gatsbyjs/gatsby/issues/28011#issuecomment-877302917
144144 }
145145
146146 return new Promise ( resolve => {
You can’t perform that action at this time.
0 commit comments