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

feat(config): XDG_CONFIG_HOME and XDG_CACHE_HOME compliance #1050

Merged
merged 8 commits into from
Mar 25, 2024

Conversation

chawyehsu
Copy link
Contributor

Close #1049

Signed-off-by: Chawye Hsu <su+git@chawyehsu.com>
Signed-off-by: Chawye Hsu <su+git@chawyehsu.com>
@pavelzw
Copy link
Contributor

pavelzw commented Mar 23, 2024

Can we have similar behavior for $XDG_CACHE_HOME for consistency?

@chawyehsu
Copy link
Contributor Author

Can we have similar behavior for $XDG_CACHE_HOME for consistency?

good idea!

Signed-off-by: Chawye Hsu <su+git@chawyehsu.com>
Signed-off-by: Chawye Hsu <su+git@chawyehsu.com>
@chawyehsu chawyehsu changed the title feat(config): XDG_CONFIG_HOME compliance feat(config): XDG_CONFIG_HOME and XDG_CACHE_HOME compliance Mar 23, 2024
Signed-off-by: Chawye Hsu <su+git@chawyehsu.com>
@anjos
Copy link

anjos commented Mar 24, 2024

Related to XDG compliance, I'm assuming that the installer will also respect these defaults?

@anjos
Copy link

anjos commented Mar 24, 2024

I'm asking because the documentation for the installation is not really explicit about this: https://pixi.sh/latest/

@ruben-arts
Copy link
Contributor

Could you also update the docs in : https://pixi.sh/latest/advanced/explain_info_command/#cache-dir

@ruben-arts
Copy link
Contributor

He @anjos which installer did you mean? The rattler cache (the underlying installer in pixi) will also use it with this PR. But if you mean the the actual pixi binary this isn't changed by this PR.

Copy link
Contributor

@ruben-arts ruben-arts left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks again @chawyehsu

@ruben-arts ruben-arts enabled auto-merge (squash) March 25, 2024 10:34
@ruben-arts ruben-arts merged commit 5d26f2f into prefix-dev:main Mar 25, 2024
26 checks passed
@anjos
Copy link

anjos commented Mar 25, 2024

Thanks to both of you!

@ruben-arts: what I meant was what is installed with the command line curl -fsSL https://pixi.sh/install.sh | bash.

@ruben-arts
Copy link
Contributor

Just to verify, you mean that we install into $HOME/.local/bin? Because no we don't do that currently.

@anjos
Copy link

anjos commented Mar 25, 2024

I apologise for the confusion - In short, I'm asking if pixi will also respect $XDG_DATA_HOME (typically $HOME/.local/share) for the location of $PIXI_HOME/envs and $PIXI_HOME/bin. In this case, I'd expect that the command-line installation of the standalone pixi binary (curl -fsSL https://pixi.sh/install.sh | bash) should also do that instead of defaulting to $HOME/.pixi.

@chawyehsu
Copy link
Contributor Author

chawyehsu commented Mar 25, 2024

It's easy to do so since we already support $PIXI_HOME, you can simply set $PIXI_HOME=$XDG_DATA_HOME/pixi and pixi will be installed to the directory as you'd expect.

@anjos
Copy link

anjos commented Mar 25, 2024

That is what I'm currently doing, thanks!

@chawyehsu chawyehsu deleted the feature/xdg-config branch October 11, 2024 09:02
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.

$XDG_CONFIG_HOME on macOS has an unexpected behaviour
5 participants