diff --git a/cmd/utask/root.go b/cmd/utask/root.go index 31472e28..b0c7571d 100644 --- a/cmd/utask/root.go +++ b/cmd/utask/root.go @@ -118,14 +118,6 @@ var rootCmd = &cobra.Command{ server = api.NewServer() server.WithAuth(defaultAuthHandler) - cfg, err := utask.Config(store) - if err != nil { - return err - } - server.SetDashboardPathPrefix(cfg.DashboardPathPrefix) - server.SetDashboardAPIPathPrefix(cfg.DashboardAPIPathPrefix) - server.SetEditorPathPrefix(cfg.EditorPathPrefix) - for _, err := range []error{ // register builtin executors builtin.Register(), @@ -143,6 +135,14 @@ var rootCmd = &cobra.Command{ } } + cfg, err := utask.Config(store) + if err != nil { + return err + } + server.SetDashboardPathPrefix(cfg.DashboardPathPrefix) + server.SetDashboardAPIPathPrefix(cfg.DashboardAPIPathPrefix) + server.SetEditorPathPrefix(cfg.EditorPathPrefix) + if utask.FDebug { log.SetLevel(log.DebugLevel) }