Merge pull request #92140 from ash2k/ash2k/fix-error-check

Fix error check logic in test
This commit is contained in:
Kubernetes Prow Robot 2020-09-22 12:21:38 -07:00 committed by GitHub
commit dbaaed3592
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -171,7 +171,7 @@ func copyFile(src, dst string) (err error) {
}
defer func() {
cerr := out.Close()
if cerr == nil {
if err == nil {
err = cerr
}
}()