We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 73939f9 commit a7f21d7Copy full SHA for a7f21d7
internal/config/config.go
@@ -49,10 +49,12 @@ func LoadConfig(startDir *pflag.Flag) {
49
log.Fatal(err)
50
}
51
52
- viper.AddConfigPath("$HOME/.tran")
53
-
+ // Windows doesn't use the $HOME env variable,
+ // check if running on Windows and if so, use $USERPROFILE
54
if runtime.GOOS == "windows" {
55
viper.AddConfigPath(`$USERPROFILE\\.tran`)
56
+ } else {
57
+ viper.AddConfigPath("$HOME/.tran")
58
59
60
viper.SetConfigName("tran")
0 commit comments