-
-
Notifications
You must be signed in to change notification settings - Fork 361
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
Support the XDG Base Directory Specification #400
Comments
@tengwar are you not seeing this behavior when using the CLI? Which version of the CLI are you using? We added XDG_CONFIG_HOME support and if it's not working as expected it is a bug, notice we are adding the config file to the XDG_CONFIG_HOME path https://github.com/exercism/cli/blob/master/paths/paths.go#L31-L42 as the default. If that variable is not set then we default to the home folder. |
I'm using exercism version 2.4.0. I installed it and on first run it created .exercism.json in my home folder. I noticed that I forgot to set the
|
I feel like the behavior in place is correct. If you set the variables after you created the config file in the home folder, we would have to fallback to home every time when attempting to read the config file if it's not at the specified place. The spec says if the variable isn't defined it'll use that and not default to home. It will only default to home if it is not set or empty. You'd need to either copy the configuration file into your XDG path if you have that variable set, or unset that variable. |
Normally you shouldn't touch home at all, but you already did. So yes, you would need a fallback to home for at least few releases - for backward compatibility. I realize I now have to move this file myself, but this bug is about 2 things:
|
I'm working a rewrite of the CLI for the new site launch, and will use the following configuration options, from most to least preferred:
(Edited to account for the windows) |
I think we've got this right in the pre-release for the 3.0.0 client. https://github.com/exercism/cli/releases/tag/v3.0.0-alpha.2 There's still a fair amount to be done before we actually launch it, but if you have a moment to verify that it does what you would expect, I'd appreciate it! |
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions. |
I'm going to go ahead and close this one, as we've solved it for the |
Currently exercism's cli client puts its config file in my
$HOME
. This creates a mess. The config file should go into$XDG_CONFIG_HOME
. (Usually it means~/.config/
,~/Library/Preferences/
or%APPDATA%
on Linux, macOS and Windows respectively.)The specification may seem complex, but there are simple Go libraries that implement it. For example the first google result is this lib.
The text was updated successfully, but these errors were encountered: