Skip to content

Commit c86f25b

Browse files
committed
refactor: improve cleaning up stale temp directories if workers fail to shutdown
1 parent 2918eac commit c86f25b

File tree

1 file changed

+5
-4
lines changed

1 file changed

+5
-4
lines changed

commands/local_server_start.go

Lines changed: 5 additions & 4 deletions
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)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy