fix: Fix develop script pid tracking, improve logging and interrupt (#5186)

This commit is contained in:
Mathias Fredriksson
2022-11-29 15:45:14 +02:00
committed by GitHub
parent 15f8967a8a
commit 085f1917db
2 changed files with 47 additions and 17 deletions
+5 -2
View File
@@ -169,8 +169,11 @@ func Server(vip *viper.Viper, newAPI func(context.Context, *coderd.Options) (*co
defer func() {
cmd.Printf("Stopping built-in PostgreSQL...\n")
// Gracefully shut PostgreSQL down!
_ = closeFunc()
cmd.Printf("Stopped built-in PostgreSQL\n")
if err := closeFunc(); err != nil {
cmd.Printf("Failed to stop built-in PostgreSQL: %v\n", err)
} else {
cmd.Printf("Stopped built-in PostgreSQL\n")
}
}()
}