From 37de32ec9038312bdda18f697640aecf51c0e85f Mon Sep 17 00:00:00 2001 From: kimcore Date: Sat, 28 Jan 2023 23:13:36 +0900 Subject: [PATCH] return proper error --- cli/packages/util/check-for-update.go | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/cli/packages/util/check-for-update.go b/cli/packages/util/check-for-update.go index 9f9daa332b..5fbf39a1e2 100644 --- a/cli/packages/util/check-for-update.go +++ b/cli/packages/util/check-for-update.go @@ -5,6 +5,7 @@ import ( "fmt" "io/ioutil" "net/http" + "errors" ) func CheckForUpdate() { @@ -25,7 +26,7 @@ func getLatestTag(repoOwner string, repoName string) (string, error) { return "", err } if resp.StatusCode != 200 { - return "", fmt.Sprintf("GitHub API returned status code %d", resp.StatusCode) + return "", errors.New(fmt.Sprintf("GitHub API returned status code %d", resp.StatusCode)) } defer resp.Body.Close()