From 62cd9180611ec8e24caed8ab5774303a20c5df0b Mon Sep 17 00:00:00 2001 From: jiuker <2818723467@qq.com> Date: Mon, 2 Jan 2023 15:26:59 +0800 Subject: [PATCH] fix: close helmInfo file descriptor (#16319) --- cmd/update.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/cmd/update.go b/cmd/update.go index 650806bf2..a9cbd5aa4 100644 --- a/cmd/update.go +++ b/cmd/update.go @@ -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=") {