Skip to content

Commit c7eb088

Browse files
committed
unset XDG_HOME_CONFIG as gitea manages configuration locations
adding error check to manage lint
1 parent 92a2900 commit c7eb088

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

Diff for: cmd/main.go

+5
Original file line numberDiff line numberDiff line change
@@ -165,6 +165,11 @@ func NewMainApp(appVer AppVersion) *cli.App {
165165
app.Commands = append(app.Commands, subCmdWithConfig...)
166166
app.Commands = append(app.Commands, subCmdStandalone...)
167167

168+
err := os.Unsetenv("XDG_CONFIG_HOME") // unset if set as HOME is managed by gitea
169+
if err != nil {
170+
fmt.Printf("error unsetting XDG_CONFIG_HOME")
171+
}
172+
168173
return app
169174
}
170175

0 commit comments

Comments
 (0)