Skip to content

Commit

Permalink
Fix: Configuration Idiosyncrasies - It's what's for dinner!
Browse files Browse the repository at this point in the history
Hopefully the last configuration related idiosyncrasy I have to address in HellPot for at least a week.
  • Loading branch information
yunginnanet committed Jun 21, 2024
1 parent 35eebac commit 4c2b0ec
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions internal/config/config.go
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,9 @@ var (

func writeConfig() string {
prefConfigLocation, _ := os.UserConfigDir()
if prefConfigLocation != "" {
prefConfigLocation = filepath.Join(prefConfigLocation, Title)
}

if prefConfigLocation == "" {
home, _ = os.UserHomeDir()
Expand All @@ -59,6 +62,7 @@ func writeConfig() string {
os.Exit(1)
}
}

Filename = filepath.Join(prefConfigLocation, "config.toml")

tomld, terr := toml.Parser().Marshal(snek.All())
Expand Down

0 comments on commit 4c2b0ec

Please sign in to comment.