From e18ea881133c4ae1a759a332492b2c65a2f2a7bd Mon Sep 17 00:00:00 2001 From: Gani Georgiev Date: Fri, 18 Oct 2024 16:06:24 +0300 Subject: [PATCH] updated ghupdate to prevent downloading unnecessary v0.23+ since it contains breaking changes --- plugins/ghupdate/ghupdate.go | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/plugins/ghupdate/ghupdate.go b/plugins/ghupdate/ghupdate.go index f85a771c..368ea912 100644 --- a/plugins/ghupdate/ghupdate.go +++ b/plugins/ghupdate/ghupdate.go @@ -164,6 +164,11 @@ func (p *plugin) update(withBackup bool) error { return nil } + if compareVersions(strings.TrimPrefix(latest.Tag, "v"), "0.23.0") <= 0 { + color.Green("%s contains breaking changes and cannot be updated directly from v0.22.x. Please check the releases CHANGELOG for more details.", latest.Tag) + return nil + } + suffix := archiveSuffix(runtime.GOOS, runtime.GOARCH) if suffix == "" { return errors.New("unsupported platform")