mirror of
https://github.com/eeeXun/GTT.git
synced 2025-05-20 01:30:07 -07:00
fix: Getenv XDG_CONFIG_HOME
Getenv don't need `$` sign
This commit is contained in:
parent
98d1cb3392
commit
98ff16df38
@ -10,8 +10,8 @@ func configInit() {
|
|||||||
|
|
||||||
config.SetConfigName("gtt")
|
config.SetConfigName("gtt")
|
||||||
config.SetConfigType("yaml")
|
config.SetConfigType("yaml")
|
||||||
if len(os.Getenv("$XDG_CONFIG_HOME")) > 0 {
|
if len(os.Getenv("XDG_CONFIG_HOME")) > 0 {
|
||||||
defaultConfigPath = os.Getenv("$XDG_CONFIG_HOME") + "/gtt"
|
defaultConfigPath = os.Getenv("XDG_CONFIG_HOME") + "/gtt"
|
||||||
config.AddConfigPath(defaultConfigPath)
|
config.AddConfigPath(defaultConfigPath)
|
||||||
} else {
|
} else {
|
||||||
defaultConfigPath = os.Getenv("HOME") + "/.config/gtt"
|
defaultConfigPath = os.Getenv("HOME") + "/.config/gtt"
|
||||||
|
Loading…
x
Reference in New Issue
Block a user