Skip to content

Commit

Permalink
fix: config: dashboard prefix setter should be configured after Init …
Browse files Browse the repository at this point in the history
…plugins

In case we are using Init plugins to register new configstore provider

Signed-off-by: Romain Beuque <[email protected]>
  • Loading branch information
rbeuque74 committed Jan 16, 2020
1 parent deb1168 commit 25570b2
Showing 1 changed file with 8 additions and 8 deletions.
16 changes: 8 additions & 8 deletions cmd/utask/root.go
Original file line number Diff line number Diff line change
Expand Up @@ -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(),
Expand All @@ -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)
}
Expand Down

0 comments on commit 25570b2

Please sign in to comment.