Skip to content

Commit c3fe42d

Browse files
cfergeaupraveenkumar
authored andcommitted
Issue #426: oc: Add missing error assignment
oc.cacheOc() is seemingly checking crcos.CopyFileContents return value. However, the CopyFileContents call is not setting 'err', so the 'err' value we are checking is from a previous call and will always be nil. This means error during the file copy will go undetected. #426
1 parent 1c17f20 commit c3fe42d

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

pkg/crc/oc/oc_cache.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -104,7 +104,7 @@ func (oc *OcCached) cacheOc() error {
104104
}
105105

106106
finalBinaryPath := filepath.Join(outputPath, binaryName)
107-
crcos.CopyFileContents(binaryPath, finalBinaryPath, 0755)
107+
err = crcos.CopyFileContents(binaryPath, finalBinaryPath, 0755)
108108
if err != nil {
109109
return err
110110
}

0 commit comments

Comments
 (0)