Skip to content

Commit

Permalink
fix: shutdown process after closing server (#4082)
Browse files Browse the repository at this point in the history
Co-authored-by: Anthony Fu <anthonyfu117@hotmail.com>
  • Loading branch information
IanVS and antfu committed Jul 12, 2021
1 parent fa4a7d6 commit eac779c
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions packages/vite/src/node/server/index.ts
Expand Up @@ -375,7 +375,7 @@ export async function createServer(
async close() {
process.off('SIGTERM', exitProcess)

if (!process.stdin.isTTY) {
if (process.env.CI !== 'true') {
process.stdin.off('end', exitProcess)
}

Expand Down Expand Up @@ -408,7 +408,6 @@ export async function createServer(

if (process.env.CI !== 'true') {
process.stdin.on('end', exitProcess)
process.stdin.resume()
}

watcher.on('change', async (file) => {
Expand Down

0 comments on commit eac779c

Please sign in to comment.