Merge pull request #688 from Morganamilo/expandenv

Fix builddir defaulting to config instead of cache
This commit is contained in:
Anna 2018-09-04 23:24:24 +01:00 committed by GitHub
commit 7133a1252e
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -147,9 +147,9 @@ func (config *Configuration) saveConfig() error {
} }
func (config *Configuration) defaultSettings() { func (config *Configuration) defaultSettings() {
buildDir := "$HOME/.config/yay" buildDir := "$HOME/.cache/yay"
if os.Getenv("XDG_CONFIG_HOME") != "" { if os.Getenv("XDG_CACHE_HOME") != "" {
buildDir = "$XDG_CONFIG_HOME/yay" buildDir = "$XDG_CACHE_HOME/yay"
} }
config.AURURL = "https://aur.archlinux.org" config.AURURL = "https://aur.archlinux.org"