-
-
Notifications
You must be signed in to change notification settings - Fork 6k
Closed
Labels
type/featureCompletely new functionality. Can only be merged if feature freeze is not active.Completely new functionality. Can only be merged if feature freeze is not active.type/proposalThe new feature has not been accepted yet but needs to be discussed first.The new feature has not been accepted yet but needs to be discussed first.
Description
Feature Description
Gitea's path system was not well designed, it just got patched and patched and accumulated a lot of problems:
- GITEA_WORK_DIR not being used for GITEA_CUSTOM when looking up locales #21498
- Gitea's path system quirk and bug #24222
- Use shadowing script for docker #17846
- gitea command prints incorrect path to config file #21606
- Inconsistent value for [repository].ROOT causes errors on
git push
#25107
The root problem is, Gitea tries to guess these paths, and the environment/command argument/config option affect each other.
This a a refactoring plan for improving this system and resolving the problem with minimal breaking.
- Deprecate the environment GITEA_XXX_DIR and command argument "--custom-dir / --work-dir"
- When "gitea web" runs, try to detect whether there is an absolute "WORK_DIR" in app.ini
- If no, use "guessed" absolute WorkDir to update the config
- Other commands always use the "WORK_DIR" in app.ini
There could be more details, I think this plan is feasible and stable.
Screenshots
No response
Metadata
Metadata
Assignees
Labels
type/featureCompletely new functionality. Can only be merged if feature freeze is not active.Completely new functionality. Can only be merged if feature freeze is not active.type/proposalThe new feature has not been accepted yet but needs to be discussed first.The new feature has not been accepted yet but needs to be discussed first.