fix: address final review comments on error handling and build tags

Signed-off-by: anushkagupta200615-jpg <anushkagupta200615@gmail.com>
pull/32347/head
anushkagupta200615-jpg 3 months ago
parent 05fd9c46ed
commit 543af2112b

@ -222,7 +222,9 @@ func extractFile(path string, mode int64, src io.Reader) error {
} }
if _, err := io.Copy(outFile, src); err != nil { if _, err := io.Copy(outFile, src); err != nil {
outFile.Close() if cErr := outFile.Close(); cErr != nil {
return fmt.Errorf("%w (also failed to close: %v)", err, cErr)
}
return err return err
} }

@ -1,4 +1,4 @@
//go:build !windows //go:build unix
/* /*
Copyright The Helm Authors. Copyright The Helm Authors.

Loading…
Cancel
Save