summaryrefslogtreecommitdiffstats
path: root/pkg/updates/updates.go
diff options
context:
space:
mode:
Diffstat (limited to 'pkg/updates/updates.go')
-rw-r--r--pkg/updates/updates.go15
1 files changed, 5 insertions, 10 deletions
diff --git a/pkg/updates/updates.go b/pkg/updates/updates.go
index ef873fdf7..1c52d0419 100644
--- a/pkg/updates/updates.go
+++ b/pkg/updates/updates.go
@@ -121,10 +121,8 @@ func (u *Updater) checkForNewUpdate() (string, error) {
return "", errors.New(errMessage)
}
- rawUrl, err := u.getBinaryUrl(newVersion)
- if err != nil {
- return "", err
- }
+ rawUrl := u.getBinaryUrl(newVersion)
+
u.Log.Info("Checking for resource at url " + rawUrl)
if !u.verifyResourceFound(rawUrl) {
errMessage := utils.ResolvePlaceholderString(
@@ -224,7 +222,7 @@ func (u *Updater) zipExtension() string {
}
// example: https://github.com/jesseduffield/lazygit/releases/download/v0.1.73/lazygit_0.1.73_Darwin_x86_64.tar.gz
-func (u *Updater) getBinaryUrl(newVersion string) (string, error) {
+func (u *Updater) getBinaryUrl(newVersion string) string {
url := fmt.Sprintf(
"%s/releases/download/%s/lazygit_%s_%s_%s.%s",
constants.Links.RepoUrl,
@@ -235,7 +233,7 @@ func (u *Updater) getBinaryUrl(newVersion string) (string, error) {
u.zipExtension(),
)
u.Log.Info("Url for latest release is " + url)
- return url, nil
+ return url
}
// Update downloads the latest binary and replaces the current binary with it
@@ -249,10 +247,7 @@ func (u *Updater) Update(newVersion string, onFinish func(error) error) {
}
func (u *Updater) update(newVersion string) error {
- rawUrl, err := u.getBinaryUrl(newVersion)
- if err != nil {
- return err
- }
+ rawUrl := u.getBinaryUrl(newVersion)
u.Log.Info("Updating with url " + rawUrl)
return u.downloadAndInstall(rawUrl)
}