Skip to content

GITEA_WORK_DIR not being used for GITEA_CUSTOM when looking up locales #21498

Closed
@plsnp

Description

@plsnp

Description

https://docs.gitea.io/en-us/environment-variables/

The documentation says:

GITEA_CUSTOM: Gitea uses GITEA_WORK_DIR/custom folder by default. Use this variable to change custom directory.

However setting GITEA_WORK_DIR is not sufficient for looking up locales and GITEA_CUSTOM must be set explicitly.

gitea2@myserver~/gitea
» HOME=/home/gitea2 GITEA_WORK_DIR=/home/gitea2/gitea /usr/local/bin/gitea2 -c /home/gitea2/gitea/conf/app.ini web
.. some log messages before
2022/10/18 15:16:59 ...ation/translation.go:60:InitLocales() [F] Failed to list locale files: Failed to check if custom directory stat /etc/gitea/options/locale: permission denied is a directory. %!v(MISSING)
gitea2@myserver~/gitea
» HOME=/home/gitea2 GITEA_CUSTOM=/home/gitea2/gitea/custom GITEA_WORK_DIR=/home/gitea2/gitea /usr/local/bin/gitea2 -c /home/gitea2/gitea/conf/app.ini web
2022/10/18 15:17:25 cmd/web.go:106:runWeb() [I] Starting Gitea on PID: 23564
.. after this failure doesn't show up and booting of gitea continues ..

I looked in app.ini for keywords etc and locale but i didn't see any reason why it might be reading from the path /etc/gitea/options/locale

Gitea Version

1.17.3

Can you reproduce the bug on the Gitea demo site?

No

Log Gist

No response

Screenshots

No response

Git Version

No response

Operating System

No response

How are you running Gitea?

downloaded binary from official website

Database

PostgreSQL

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions