Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 4 additions & 1 deletion main.go
Original file line number Diff line number Diff line change
Expand Up @@ -3760,10 +3760,13 @@ func runUpdateCLI() (err error) {
return fmt.Errorf("could not create temp file: %w", err)
}
_, err = io.Copy(outFile, respAsset.Body)
outFile.Close()
if err != nil {
outFile.Close()
return fmt.Errorf("could not write asset to disk: %w", err)
}
if err := outFile.Close(); err != nil {
return fmt.Errorf("could not finalize asset file: %w", err)
}

// Determine the expected binary name based on the OS.
binaryName := "matcha"
Expand Down
Loading