Close config file after decoding
All checks were successful
ci/woodpecker/push/woodpecker Pipeline was successful

This commit is contained in:
Elara 2023-06-09 20:32:58 -07:00
parent 2a8cb0bb54
commit cf08c9e928

View File

@ -91,6 +91,10 @@ func main() {
if err != nil { if err != nil {
log.Fatal("Error decoding config file").Err(err).Send() log.Fatal("Error decoding config file").Err(err).Send()
} }
err = fl.Close()
if err != nil {
log.Fatal("Error closing config file").Err(err).Send()
}
} }
if _, err := os.Stat(cfg.Git.RepoDir); os.IsNotExist(err) { if _, err := os.Stat(cfg.Git.RepoDir); os.IsNotExist(err) {