-
Notifications
You must be signed in to change notification settings - Fork 8k
Closed
Labels
bugSomething isn't workingSomething isn't workingconfigpriority-3Affects a small number of users or is largely cosmeticAffects a small number of users or is largely cosmetic
Description
Describe the bug
$ gh --version
gh version 0.5.7 (2020-02-20)
https://github.com/cli/cli/releases/tag/v0.5.7
gh appears to conform to the XDG basedir spec by writing to ~/.config/gh. However, it does not respect XDG_CONFIG_HOME as it should. ~/.config is the default value for XDG_CONFIG_HOME, but should only be used if XDG_CONFIG_HOME itself is unset. If it is set, it should be respected.
Steps to reproduce the behavior
rm -rf ~/.config/gh(or rename)export XDG_CONFIG_HOME=$(mktemp -d)(configure a custom config-home)gh issue listrun a command to trigger authenticationls ~/.config/ghnote thatghwas re-created under~/.configinstead of the temp directoryls $XDG_CONFIG_HOMEnote that nothing was written toXDG_CONFIG_HOME; this is wheregh/config.ymlshould have been written.
Expected vs actual behavior
Conformance to the XDG spec requires that the XDG_CONFIG_HOME variable be respected for where to write user configuration files. gh is writing to ~/.config but not respecting XDG_CONFIG_HOME when it is set.
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
bugSomething isn't workingSomething isn't workingconfigpriority-3Affects a small number of users or is largely cosmeticAffects a small number of users or is largely cosmetic