Skip to content

Commit 738d842

Browse files
authored
Merge pull request #569 from tucksaun/refactor/improve-cleaning-up-workers-errors
refactor: improve cleaning up stale temp directories if workers fail to stop
2 parents 4d89b47 + c86f25b commit 738d842

File tree

1 file changed

+5
-4
lines changed

1 file changed

+5
-4
lines changed

commands/local_server_start.go

+5-4
Original file line numberDiff line numberDiff line change
@@ -413,15 +413,16 @@ var localServerStartCmd = &console.Command{
413413
case <-shutdownCh:
414414
terminal.Eprintln("")
415415
terminal.Eprintln("Shutting down! Waiting for all workers to be done.")
416-
if err := waitForWorkers(projectDir, pidFile); err != nil {
417-
return err
418-
}
419-
terminal.Eprintln("")
416+
err := waitForWorkers(projectDir, pidFile)
420417
// wait for the PHP Server to be done cleaning up
421418
if p.PHPServer != nil {
422419
<-p.PHPServer.StoppedChan
423420
}
424421
pidFile.CleanupDirectories()
422+
if err != nil {
423+
return err
424+
}
425+
terminal.Eprintln("")
425426
ui.Success("Stopped all processes successfully")
426427
}
427428
return nil

0 commit comments

Comments
 (0)