Fix: Configuration Idiosyncrasies - It's what's for dinner!

Hopefully the last configuration related idiosyncrasy I have to address in HellPot for at least a week.
This commit is contained in:
kayos@tcp.direct 2024-06-20 17:47:30 -07:00
parent 35eebac88b
commit 4c2b0ec3be
No known key found for this signature in database
GPG Key ID: 4B841471B4BEE979
1 changed files with 4 additions and 0 deletions

View File

@ -47,6 +47,9 @@ var (
func writeConfig() string {
prefConfigLocation, _ := os.UserConfigDir()
if prefConfigLocation != "" {
prefConfigLocation = filepath.Join(prefConfigLocation, Title)
}
if prefConfigLocation == "" {
home, _ = os.UserHomeDir()
@ -59,6 +62,7 @@ func writeConfig() string {
os.Exit(1)
}
}
Filename = filepath.Join(prefConfigLocation, "config.toml")
tomld, terr := toml.Parser().Marshal(snek.All())