mirror of
https://gitcode.com/gitea/gitea.git
synced 2025-05-31 07:08:06 +08:00
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>
This commit is contained in:
@ -166,3 +166,8 @@ func EnvironmentToConfig(cfg ConfigProvider, envs []string) (changed bool) {
|
||||
}
|
||||
return changed
|
||||
}
|
||||
|
||||
// InitGiteaEnvVars initilises the environment for gitea
|
||||
func InitGiteaEnvVars() {
|
||||
_ = os.Unsetenv("XDG_CONFIG_HOME") // unset if set as HOME is managed by gitea
|
||||
}
|
||||
|
Reference in New Issue
Block a user