Skip to content

Conforming to the XDG specification #9985

@NellyWhads

Description

@NellyWhads

Currently, uv prioritizes $HOME/... paths over $XDG_* paths in most cases. This behavior is contradictory to the XDG specification.

This means when setting XDG_* variables in a docker image, for example, UV_* variables also must be set.

Examples of variables which do not automatically use the XDG_* specification:

ENV UV_TOOL_DIR="${XDG_STATE_HOME}/uv/tools"
ENV UV_PYTHON_INSTALL_DIR="${XDG_STATE_HOME}/uv/python"
ENV UV_CACHE_DIR="${XDG_CACHE_HOME}/uv"

Example of a UV_* variable mapping to multiple potential XDG_* locations: https://docs.astral.sh/uv/configuration/installer/#changing-the-install-path

Consistent environment inheritance would make uv easier to configure according to the XDG specification.

Metadata

Metadata

Assignees

No one assigned

    Labels

    questionAsking for clarification or support

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions