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: Add XDG_CONFIG_HOME/.config to search of pixi global manifest path #2547

Merged
merged 12 commits into from
Nov 27, 2024

Conversation

hoxbro
Copy link
Contributor

@hoxbro hoxbro commented Nov 23, 2024

Follow up on the question asked here: https://discord.com/channels/1082332781146800168/1307282213770891329

This will search $XDG_CONFIG_HOME/pixi/pixi-global.toml, then ~.config/pixi/pixi-global.toml, and at last, the current location $PIXI_HOME/manifests/pixi-global.toml.

The code could be better, so I would love feedback.

TODO:

@hoxbro hoxbro changed the title enh: Add XDG_CONFIG_HOME/.config to search of pixi global manifest path feat: Add XDG_CONFIG_HOME/.config to search of pixi global manifest path Nov 23, 2024
@Hofer-Julian Hofer-Julian marked this pull request as ready for review November 27, 2024 09:06
@Hofer-Julian
Copy link
Contributor

@hoxbro thanks for your contribution!

I've extended your PR and fixed a few problems with it, docs are now present as well.

Also tried to add tests, but had to give up on that. I simply couldn't find a way to set environment variables without influencing other tests.

@ruben-arts
Copy link
Contributor

Hey I checked it out, but it will always try to write into the pixi_home() dir. As it will always have a Home dir.

Please check if it exists first.

@Hofer-Julian
Copy link
Contributor

Please check if it exists first.

Should be fixed now

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.

Two more small docs fixes and then it looks fine to me!

docs/features/global_tools.md Outdated Show resolved Hide resolved
docs/features/global_tools.md Outdated Show resolved Hide resolved
@Hofer-Julian Hofer-Julian enabled auto-merge (squash) November 27, 2024 16:32
@Hofer-Julian Hofer-Julian merged commit 8ff2190 into prefix-dev:main Nov 27, 2024
43 checks passed
jjjermiah pushed a commit to jjjermiah/pixi that referenced this pull request Nov 30, 2024
…st path (prefix-dev#2547)

Follow up on the question asked here:
https://discord.com/channels/1082332781146800168/1307282213770891329

This will search `$XDG_CONFIG_HOME/pixi/pixi-global.toml`, then
`~.config/pixi/pixi-global.toml`, and at last, the current location
`$PIXI_HOME/manifests/pixi-global.toml`.

The code could be better, so I would love feedback. 

TODO:
- Need to add some tests (not entirely sure how easy this would be with
being dependent on the filesystem)
- Update the
https://pixi.sh/latest/features/global_tools/#manifest-locations

---------

Co-authored-by: Hofer-Julian <[email protected]>
Co-authored-by: Julian Hofer <[email protected]>
Co-authored-by: Ruben Arts <[email protected]>
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.

3 participants