[#7781] reverted autorecover panic handling for the cli commands

This commit is contained in:
Gani Georgiev
2026-07-29 18:53:04 +03:00
parent 6b00152847
commit e83e911b2f
2 changed files with 6 additions and 4 deletions
+4 -4
View File
@@ -186,21 +186,21 @@ func (pb *PocketBase) Execute() error {
done := make(chan bool, 1)
// listen for interrupt signal to gracefully shutdown the application
routine.FireAndForget(func() {
go func() {
sigch := make(chan os.Signal, 1)
signal.Notify(sigch, os.Interrupt, syscall.SIGTERM)
<-sigch
done <- true
})
}()
// execute the root command
routine.FireAndForget(func() {
go func() {
// note: leave to the commands to decide whether to print their error
pb.RootCmd.Execute()
done <- true
})
}()
<-done