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

Use XDG_CONFIG_HOME if defined #232

Closed
wants to merge 2 commits into from
Closed

Use XDG_CONFIG_HOME if defined #232

wants to merge 2 commits into from

Conversation

louisbranch
Copy link
Contributor

If defined, XDG_CONFIG_HOME will take precedence over ~/.manifoldrc for reading and writing the config file.

Closes: #227

@louisbranch louisbranch self-assigned this Jul 27, 2018
@manifold-listbot
Copy link

manifold-listbot commented Jul 27, 2018

Author

  • Changelog has been updated

@louisbranch louisbranch requested a review from a team July 27, 2018 13:45
Copy link

@dsifford dsifford left a comment

Choose a reason for hiding this comment

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

Thanks for the work on this @LuizBranco

Here's a couple thoughts I have:

  1. I'm assuming you understand that the way that this is implemented that it is not technically XDG compliant, being that it still falls back to ~/.manifold. According to the XDG spec, even if XDG_CONFIG_HOME is not declared, it should ultimately fall back to ~/.config/manifold/config and not touch the home directory. Is full compliance to the spec the endgame here or are you guys just shooting for partial? If partial is the goal, maybe it would just be easier to add an environment variable for the user to specify directories.

  2. Regarding your comments on not really being clear where the binaries should go: IMHO, I think they should go into $XDG_DATA_HOME/manifold/bin/ and then be symlinked into ~/.local/bin (on mac on linux systems). Not totally sure how to go about it on Windows.

@dsifford
Copy link

Addendum to my last point regarding where binaries should be placed: That is only assuming that this is a user-level installation.

If being installed system-wide, it should use the default system-wide location (e.g. /usr/bin/xxx or sometimes /usr/local/bin/xxx)

@tim-speed
Copy link
Contributor

@LuizBranco we should probably have an OS switch in here, the windows situation is very different. They have an app data directory where this would go.

I also like the point about:
~/.config/manifold/config and agree we should default to ~/.config/manifold/ as the path we store config in on Linux / OSX if none is present
But if a config is exists at ~/.manifoldrc we should still read it for backwards compatibility.
We could also consider using it as an override.

@louisbranch louisbranch added wip and removed wip labels Nov 1, 2018
@louisbranch
Copy link
Contributor Author

Sorry, closing this one for now since the code didn't address the issue.

@louisbranch louisbranch deleted the xdg branch December 12, 2018 14:34
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.

5 participants