diff --git a/internal/utils/env.go b/internal/utils/env.go index 57d8db2..4b7fcfc 100644 --- a/internal/utils/env.go +++ b/internal/utils/env.go @@ -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,