travis.rb icon indicating copy to clipboard operation
travis.rb copied to clipboard

~/.travis/config.yml ought to be stored in $XDG_CONFIG_HOME

Open jasonkarns opened this issue 10 years ago • 2 comments

This is a user-friendly/consistency improvement. There is a specification that is quickly becoming the standard for *nix based application data and configuration files.

$XDG_DATA_HOME is to be used for user-specific data, and defaults to $HOME/.local/share if not set.

$XDG_CONFIG_HOME is to be used for user-specific configuration files and defaults to $HOME/.config if not set.

So travis configuration files ought to be stored under $XDG_CONFIG_HOME/travis (defaulting to $HOME/.config/travis if $XDG_CONFIG_HOME is unset.

The most visible tool I'm aware of (so far) that already follows this spec/convention is git. (and most github utilities like github for mac and hub)

(moved from https://github.com/travis-ci/travis-ci/issues/2608)

jasonkarns avatar Aug 04 '14 15:08 jasonkarns

I generally agree with adapting to XDG here, but wanted to note something related to #735.

I'll avoid projecting; personally, I tend to interpret considerate use of XDG as a strong signal that I may want to keep anything the developers saw fit to put in XDG_CONFIG_HOME. (i.e., I triage more carefully when a package isn't using XDG, or doesn't seem to be using it thoughtfully...)

I think this makes it a little more important to clearly communicate whether the file should persist, and if people need to make sure it doesn't find its way into a public dotfile repo.

abathur avatar Apr 10 '20 15:04 abathur

Until this issue is solved, a workaround is

export TRAVIS_CONFIG_PATH=${XDG_CONFIG_HOME:-$HOME/.config}/travis

erikw avatar Oct 28 '21 15:10 erikw