fix: close helmInfo file descriptor (#16319)

This commit is contained in:
jiuker
2023-01-02 15:26:59 +08:00
committed by GitHub
parent 6a04067514
commit 62cd918061

View File

@@ -181,7 +181,7 @@ func getHelmVersion(helmInfoFilePath string) string {
}
return ""
}
defer helmInfoFile.Close()
scanner := bufio.NewScanner(helmInfoFile)
for scanner.Scan() {
if strings.Contains(scanner.Text(), "chart=") {