Skip to content

Commit cdc618e

Browse files
anjannathopenshift-merge-robot
authored andcommitted
check for error from scanner
this was missed in the PR #3564
1 parent a4e4e24 commit cdc618e

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

pkg/crc/ssh/keys.go

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -127,6 +127,10 @@ func RemoveCRCHostEntriesFromKnownHosts() error {
127127
}
128128
}
129129

130+
if err := scanner.Err(); err != nil {
131+
return fmt.Errorf("Error while reading content from known_hosts file: %w", err)
132+
}
133+
130134
if err := writer.Flush(); err != nil {
131135
return fmt.Errorf("Error while flushing buffered content to temp file: %w", err)
132136
}

0 commit comments

Comments
 (0)