updated ui deps and skip creating pb_data on --version or --help execution
This commit is contained in:
+11
-3
@@ -100,6 +100,14 @@ func New() *PocketBase {
|
||||
pb.debugFlag,
|
||||
)}
|
||||
|
||||
// hide the default help command (allow only `--help` flag)
|
||||
pb.RootCmd.SetHelpCommand(&cobra.Command{Hidden: true})
|
||||
|
||||
// hook the bootstrap process
|
||||
pb.RootCmd.PersistentPreRunE = func(cmd *cobra.Command, args []string) error {
|
||||
return pb.Bootstrap()
|
||||
}
|
||||
|
||||
return pb
|
||||
}
|
||||
|
||||
@@ -143,9 +151,9 @@ func (pb *PocketBase) Start() error {
|
||||
// This method differs from pb.Start() by not registering the default
|
||||
// system commands!
|
||||
func (pb *PocketBase) Execute() error {
|
||||
if err := pb.Bootstrap(); err != nil {
|
||||
return err
|
||||
}
|
||||
// if err := pb.Bootstrap(); err != nil {
|
||||
// return err
|
||||
// }
|
||||
|
||||
var wg sync.WaitGroup
|
||||
|
||||
|
||||
Reference in New Issue
Block a user