Skip to content

Commit 08c43fc

Browse files
bug: silent pass when API not 200 (#222)
* bug: silent pass when API is 404 * bug: silent pass when API is 404
1 parent 9bb7b72 commit 08c43fc

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

internal/versionupdate/check_version_update.go

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -38,6 +38,11 @@ func Check(currentVersion string) {
3838
return
3939
}
4040
defer response.Body.Close()
41+
if response.StatusCode != http.StatusOK {
42+
// If we can't get the latest version, just return
43+
return
44+
}
45+
4146
respBytes, err := io.ReadAll(response.Body)
4247
if err != nil {
4348
return

0 commit comments

Comments
 (0)