Bugfix: Use correct config dir

This commit is contained in:
Layla 2023-06-19 03:51:13 -04:00
parent c13c0225c3
commit d52e3e1c3c

View File

@ -7,6 +7,7 @@ import (
"log"
"os"
"path"
"path/filepath"
"github.com/ilyakaznacheev/cleanenv"
"github.com/yeslayla/birdbot/app"
@ -32,6 +33,9 @@ func main() {
flag.BoolVar(&version, "v", false, "List version")
flag.Parse()
// Use given config dir
configDir = filepath.Dir(config_file)
if version {
fmt.Printf("BirdBot %s (%s)\n", app.Version, app.Build)
return