Skip to content

Commit

Permalink
fix: don't override existing xdg values (#42)
Browse files Browse the repository at this point in the history
  • Loading branch information
doron-cohen committed Dec 8, 2020
1 parent 6316e35 commit 7d3611d
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions internal/utils/env.go
Original file line number Diff line number Diff line change
Expand Up @@ -22,9 +22,9 @@ func ExpandEnv(text string) string {
}

func XdgVarsExport() string {
return fmt.Sprintf(`export XDG_CONFIG_HOME="%s"
export XDG_CACHE_HOME="%s"
export XDG_DATA_HOME="%s"`,
return fmt.Sprintf(`export XDG_CONFIG_HOME="${XDG_CONFIG_HOME:-"%s"}"
export XDG_CACHE_HOME="${XDG_CACHE_HOME:-"%s"}"
export XDG_DATA_HOME="${XDG_DATA_HOME:-"%s"}"`,
xdg.ConfigHome,
xdg.CacheHome,
xdg.DataHome,
Expand Down

0 comments on commit 7d3611d

Please sign in to comment.