Commit c147c5ae7e

c147c5ae7e1726d8733ba13fa49bf93a881b7348

parent: 1afb82e5a5

Unsigned

Wraient <wraient.911@gmail.com> · 2024-10-23 11:36 UTC

Fix debug file path

Layout: unified · split

cmd/curd/main.go +5 −5
@@ -16,16 +16,13 @@ func main() {
1616 discordClientId := "1287457464148820089"
1717
1818 // Setup
19
20 // internal.ClearScreen()
21 // defer internal.RestoreScreen()
19 internal.ClearScreen()
20 defer internal.RestoreScreen()
2221
2322 var anime internal.Anime
2423 var user internal.User
2524
2625 configFilePath := os.ExpandEnv("$HOME/.config/curd/curd.conf")
27 logFile := "debug.log"
28 internal.ClearLogFile(logFile)
2926
3027 // load curd userCurdConfig
3128 userCurdConfig, err := internal.LoadConfig(configFilePath)
@@ -34,6 +31,9 @@ func main() {
3431 return
3532 }
3633
34 logFile := filepath.Join(os.ExpandEnv(userCurdConfig.StoragePath), "debug.log")
35 internal.ClearLogFile(logFile)
36
3737 // Flags configured here cause userconfig needs to be changed.
3838 flag.StringVar(&userCurdConfig.Player, "player", userCurdConfig.Player, "Player to use for playback (Only mpv supported currently)")
3939 flag.StringVar(&userCurdConfig.StoragePath, "storage-path", userCurdConfig.StoragePath, "Path to the storage directory")