-
Notifications
You must be signed in to change notification settings - Fork 71
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
Moves config for new users into a .config folder per #33 #71
Conversation
…/twitchdev/twitch-cli into enhancement/config-path-issue-33
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Good job so far, looking forward to have this merged in 👍 I've got a couple things to point out though
- I believe that this PR should also take
XDG_CONFIG_HOME
into account and use it instead of".config"
if the mentioned environment variable exists. - How would this act on Windows? I believe that should use
%APPDATA%
's value instead of".config"
, since that's the closest equivalent of.config
on Windows.
I've recently done similar work with implementing viper respecting XDG standard to a project I collaborate on. Guessing it might be helpful a little, so here it is: https://github.com/Chatterino/api/blob/d6d80e88538bf75af022e487aef6ffb81c0548eb/pkg/config/config.go#L84-L103
Appreciate it; currently it would just tuck it in a .config folder on Windows; but agree $APPDATA might be a good fit; might use some of that code since it is pretty similar to what we'd like to achieve. |
By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.
Problem/Feature
Per feedback in #33, this PR moves new installation's configurations to a .config subdirectory; existing users are unaffected.
Description of Changes:
Checklist