Skip to content

Commit 25570b2

Browse files
committed
fix: config: dashboard prefix setter should be configured after Init plugins
In case we are using Init plugins to register new configstore provider Signed-off-by: Romain Beuque <[email protected]>
1 parent deb1168 commit 25570b2

File tree

1 file changed

+8
-8
lines changed

1 file changed

+8
-8
lines changed

cmd/utask/root.go

+8-8
Original file line numberDiff line numberDiff line change
@@ -118,14 +118,6 @@ var rootCmd = &cobra.Command{
118118
server = api.NewServer()
119119
server.WithAuth(defaultAuthHandler)
120120

121-
cfg, err := utask.Config(store)
122-
if err != nil {
123-
return err
124-
}
125-
server.SetDashboardPathPrefix(cfg.DashboardPathPrefix)
126-
server.SetDashboardAPIPathPrefix(cfg.DashboardAPIPathPrefix)
127-
server.SetEditorPathPrefix(cfg.EditorPathPrefix)
128-
129121
for _, err := range []error{
130122
// register builtin executors
131123
builtin.Register(),
@@ -143,6 +135,14 @@ var rootCmd = &cobra.Command{
143135
}
144136
}
145137

138+
cfg, err := utask.Config(store)
139+
if err != nil {
140+
return err
141+
}
142+
server.SetDashboardPathPrefix(cfg.DashboardPathPrefix)
143+
server.SetDashboardAPIPathPrefix(cfg.DashboardAPIPathPrefix)
144+
server.SetEditorPathPrefix(cfg.EditorPathPrefix)
145+
146146
if utask.FDebug {
147147
log.SetLevel(log.DebugLevel)
148148
}

0 commit comments

Comments
 (0)