Skip to content

Commit 1eb65e7

Browse files
authored
fix: close temporary kubeconfig file (#1441)
1 parent a369516 commit 1eb65e7

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

pkg/plugin/kubeconfig.go

+1
Original file line numberDiff line numberDiff line change
@@ -123,6 +123,7 @@ func PersistKubeConfig(_ context.Context, kc []byte) (string, func(context.Conte
123123
if err != nil {
124124
return "", nil, errors.Wrap(err, "while writing kube config to file")
125125
}
126+
defer file.Close()
126127

127128
abs, err := filepath.Abs(file.Name())
128129
if err != nil {

0 commit comments

Comments
 (0)