Configuration path can come from environment.#2444
Conversation
vilmibm
left a comment
There was a problem hiding this comment.
Thank you for this! I agree that this is useful and I believe the reason we don't yet support it is because we intended to respect XDG_CONFIG_HOME and XDG_DATA_HOME for our config and hosts files.
It's been a long time since the conversation in #554 and I'd like us to resume it now that more has happened to our configuration system.
Until then, this PR can hang out. It might be the case that we don't want to pretend to adhere to the XDG spec if our files don't actually qualify as pure config files; in that case, an ad-hoc variable like this might be the way to go.
Thanks for patience.
|
I'd be happy to rework to use |
|
@samcoe this looks good and just needs a review / conflict cleanup to ensure every use of the path is updated 👍 |
samcoe
left a comment
There was a problem hiding this comment.
I cleaned this up a bit by removing the final places where ~/.config/gh was hardcoded and fixed up the tests. I think this is good to go now 👍
This adds support for using the GH_CONFIG_DIR environment variable to determine where the config files are written, this is useful for cases where the homedir is not writable.
This adds support for using the GH_CONFIG_DIR environment variable to determine
where the config files are written, this is useful for cases where the homedir
is not writable.