reverted autorecover panic handling for the cli commands

This commit is contained in:
Gani Georgiev
2026-07-29 21:18:35 +03:00
parent a10ce4e49c
commit 75f13ce96f
34 changed files with 50 additions and 46 deletions
+4 -5
View File
@@ -12,7 +12,6 @@ import (
"github.com/pocketbase/pocketbase/cmd"
"github.com/pocketbase/pocketbase/core"
"github.com/pocketbase/pocketbase/tools/list"
"github.com/pocketbase/pocketbase/tools/routine"
"github.com/spf13/cobra"
)
@@ -157,21 +156,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