Skip to content

Commit

Permalink
Return a never to be resolved promise to prevent development server f…
Browse files Browse the repository at this point in the history
…rom exiting early fixes #3932 (#3933)
  • Loading branch information
KyleAMathews committed Feb 9, 2018
1 parent 8dcd7cc commit 41841ec
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion packages/gatsby-cli/src/create-cli.js
Original file line number Diff line number Diff line change
Expand Up @@ -102,7 +102,11 @@ function buildLocalCommands(cli, isLocalSite) {
handler: handlerP(
getCommandHandler(`develop`, (args, cmd) => {
process.env.NODE_ENV = process.env.NODE_ENV || `development`
return cmd(args)
cmd(args)
// Return an empty promise to prevent handlerP from exiting early.
// The development server shouldn't ever exit until the user directly
// kills it so this is fine.
return new Promise(resolve => {})
})
),
})
Expand Down

0 comments on commit 41841ec

Please sign in to comment.