unset XDG_HOME_CONFIG as gitea manages configuration locations (#33067)

unset XDG_CONFIG_HOME early to enable gitea to manage git configuration.
simple error checking to satisfy the linting. Closes #33039

---------

Co-authored-by: wxiaoguang <wxiaoguang@gmail.com>
(cherry picked from commit 233b7959e0518c47ef83c6a80c617546983433eb)
This commit is contained in:
JonRB 2025-01-01 22:37:35 +00:00 committed by Earl Warren
parent e7bc13a0be
commit 6208d5f5c2
No known key found for this signature in database
GPG key ID: 0579CB2928A78A00
3 changed files with 7 additions and 0 deletions

View file

@ -59,6 +59,7 @@ func InitSettings() {
_ = hash.Register("dummy", hash.NewDummyHasher)
setting.PasswordHashAlgo, _ = hash.SetDefaultPasswordHashAlgorithm("dummy")
setting.InitGiteaEnvVars()
}
// TestOptions represents test options