mirror of
https://github.com/pocketbase/pocketbase.git
synced 2026-10-23 22:40:24 +02:00
added admin console command tests
This commit is contained in:
1 parent
4d94673839
commit
faa0a9f7dc
5 files changed
+266
-43
No files matched your search
+4
-2
@@ -1,7 +1,6 @@
|
||||
package pocketbase
|
||||
|
||||
import (
|
||||
"log"
|
||||
"os"
|
||||
"os/signal"
|
||||
"path/filepath"
|
||||
@@ -9,6 +8,7 @@ import (
|
||||
"sync"
|
||||
"syscall"
|
||||
|
||||
"github.com/fatih/color"
|
||||
"github.com/pocketbase/pocketbase/cmd"
|
||||
"github.com/pocketbase/pocketbase/core"
|
||||
"github.com/pocketbase/pocketbase/tools/list"
|
||||
@@ -171,7 +171,9 @@ func (pb *PocketBase) Execute() error {
|
||||
go func() {
|
||||
defer wg.Done()
|
||||
if err := pb.RootCmd.Execute(); err != nil {
|
||||
log.Println(err)
|
||||
// @todo replace with db log once generalized logs are added
|
||||
// (note may need to update the existing commands to not silence errors)
|
||||
color.Red(err.Error())
|
||||
}
|
||||
}()
|
||||
|
||||
|
||||
Reference in new issue
Block a user