-
-
Notifications
You must be signed in to change notification settings - Fork 5.5k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Fix settings not being loaded at CLI #26402
base: main
Are you sure you want to change the base?
Conversation
I wonder if this is really the right place to load the settings or if we should do it earlier. Doing it in the middle of command processing does seem odd. |
Both way works as of my tests. I thought to initialize together with the DB but thinking better at the beginning may be more clean. I'll adjust it |
Signed-off-by: cassiozareck <cassiomilczareck@gmail.com>
efa170c
to
6096745
Compare
Ah I see the context now, previous place was fine then I guess, the validation does not depend on settings it looks like. Note I'm not really knowledgeable around these parts so take my comments with a grain of salt :) |
As we're loading settings there's happening some output when a user runs
|
That reinforces that it needs to be after validation. |
Hmm so its ok? I think its unavoidable unless we try to change the config for logging outputs before |
Just revert to previous location imho. |
Oh no no! It happen doesn't matter where loadsetting is. There's log statements inside loadsettings. I think its alright as it states settings are being loaded but if you dont want log to happen I can see what I can do. I know I caused some confusion because it looked like I was saying because of position. Pls dont avoid my PRs 😆 |
Closes #25898
The problem was that the default settings weren't being loaded, so
gitea/models/user/user.go
Line 593 in ad69f71
was always false.