Fix settings not being loaded at CLI (#26402)

Closes #25898
The problem was that the default settings weren't being loaded

---------

Signed-off-by: cassiozareck <cassiomilczareck@gmail.com>
Co-authored-by: Lunny Xiao <xiaolunwen@gmail.com>
Co-authored-by: wxiaoguang <wxiaoguang@gmail.com>
This commit is contained in:
cassio zareck 2024-12-30 02:54:20 -03:00 committed by GitHub
parent dafadf0028
commit 1e2c8eb494
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
7 changed files with 16 additions and 13 deletions

View file

@ -69,6 +69,10 @@ var microcmdUserCreate = &cli.Command{
}
func runCreateUser(c *cli.Context) error {
// this command highly depends on the many setting options (create org, visibility, etc.), so it must have a full setting load first
// duplicate setting loading should be safe at the moment, but it should be refactored & improved in the future.
setting.LoadSettings()
if err := argsSet(c, "email"); err != nil {
return err
}