updated ui deps and skip creating pb_data on --version or --help execution

This commit is contained in:
Gani Georgiev
2022-09-09 13:58:29 +03:00
parent 96d09a30c4
commit 4a6bc453de
11 changed files with 25 additions and 17 deletions
+11 -3
View File
@@ -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