Skip to content

Refactor path system #24818

Closed
Closed
@wxiaoguang

Description

@wxiaoguang

Feature Description

Gitea's path system was not well designed, it just got patched and patched and accumulated a lot of problems:

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.

  1. Deprecate the environment GITEA_XXX_DIR and command argument "--custom-dir / --work-dir"
  2. 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
  3. 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

No one assigned

    Labels

    type/featureCompletely 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.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions