Skip to content

Commit 358d545

Browse files
Update check_for_updates.go
Co-authored-by: Luca Rinaldi <lucarin@protonmail.com>
1 parent 36e35e8 commit 358d545

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

check_for_updates.go

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,9 @@ func checkForUpdates() (string, error) {
4141
return "", err
4242
}
4343
defer resp.Body.Close()
44-
44+
if resp.StatusCode != http.StatusOK {
45+
return "", fmt.Errorf("failed to fetch latest release: status code %d", resp.StatusCode)
46+
}
4547
var release struct {
4648
TagName string `json:"tag_name"`
4749
}

0 commit comments

Comments
 (0)