Update ota.go

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
This commit is contained in:
Marc Brooks 2025-10-04 00:51:43 -05:00 committed by GitHub
parent dd387e21bd
commit f9bc3d66d6
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1 changed files with 3 additions and 1 deletions

4
ota.go
View File

@ -261,7 +261,9 @@ func verifyFile(path string, expectedHash string, verifyProgress *float32, scope
}
// close the file so we can rename below
fileToHash.Close()
if err := fileToHash.Close(); err != nil {
return fmt.Errorf("error closing file: %w", err)
}
hashSum := hex.EncodeToString(hash.Sum(nil))
scopedLogger.Info().Str("path", path).Str("hash", hashSum).Msg("SHA256 hash of")