Skip to content

Commit

Permalink
check for error from scanner
Browse files Browse the repository at this point in the history
this was missed in the PR #3564
  • Loading branch information
anjannath authored and openshift-merge-robot committed Apr 10, 2023
1 parent a4e4e24 commit cdc618e
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions pkg/crc/ssh/keys.go
Original file line number Diff line number Diff line change
Expand Up @@ -127,6 +127,10 @@ func RemoveCRCHostEntriesFromKnownHosts() error {
}
}

if err := scanner.Err(); err != nil {
return fmt.Errorf("Error while reading content from known_hosts file: %w", err)
}

if err := writer.Flush(); err != nil {
return fmt.Errorf("Error while flushing buffered content to temp file: %w", err)
}
Expand Down

0 comments on commit cdc618e

Please sign in to comment.