fix: close config file (#1531)

Co-authored-by: M. Mert Yildiran <me@mertyildiran.com>
This commit is contained in:
guangwu 2024-05-06 05:31:34 +08:00 committed by GitHub
parent 06e0def53e
commit 22a777ac79
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -146,6 +146,7 @@ func loadConfigFile(config *ConfigStruct, silent bool) error {
} else {
ConfigFilePath = cwdConfig
}
defer reader.Close()
buf, err := io.ReadAll(reader)
if err != nil {