Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

install.sh: Honor XDG_DATA_HOME #1325

Merged
merged 1 commit into from
Sep 27, 2023
Merged

install.sh: Honor XDG_DATA_HOME #1325

merged 1 commit into from
Sep 27, 2023

Conversation

Finii
Copy link
Collaborator

@Finii Finii commented Jul 28, 2023

[why]
When a user sets the XDG_DATA_HOME environment variable the default of $HOME/.local/share should not be used.

https://wiki.archlinux.org/title/XDG_Base_Directory

[how]
Enable XDG_DATA_HOME to override the default user data directory on Unix and MacOS platforms.

There is some controversy if XDG_DATA_HOME should be honored on MacOS, see for example platformdirs (link below). But me also working on Linux and MacOS (and Windows) in parallel, I can not quite follow the downsides and believe we should allow XDG_DATA_HOME also for MacOS.

Related: tox-dev/platformdirs#4
Fixes: #1324

Suggested-by: Anthony Foglia <@afoglia>

Requirements / Checklist

What does this Pull Request (PR) do?

If envvar XDG_DATA_HOME is set and the user want to install into a user directory the default path is adjusted accordingly.

How should this be manually tested?

Any background context you can provide?

What are the relevant tickets (if any)?

Screenshots (if appropriate or helpful)

[why]
When a user sets the XDG_DATA_HOME environment variable the default of
$HOME/.local/share should not be used.

https://wiki.archlinux.org/title/XDG_Base_Directory

[how]
Enable XDG_DATA_HOME to override the default user data directory on Unix
and MacOS platforms.

There is some controversy if XDG_DATA_HOME should be honored on MacOS,
see for example platformdirs (link below). But me also working on Linux
and MacOS (and Windows) in parallel, I can not quite follow the
downsides and believe we should allow XDG_DATA_HOME also for MacOS.

Related: tox-dev/platformdirs#4
Fixes: #1324

Suggested-by: Anthony Foglia <@afoglia>
Signed-off-by: Fini Jastrow <ulf.fini.jastrow@desy.de>
@Finii Finii merged commit e398a38 into master Sep 27, 2023
@Finii Finii deleted the feature/allow-XDG_DATA_HOME branch September 27, 2023 04:04
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

install.sh should use XDG_DATA_HOME to determine target location for user installs
1 participant