Debian Codegraph @

debian/patches/disable-install-update-bettercap.patch

raw symbols SCIP
1 Description: Disable 'checking latest stable release' via update.check on.
2 Author: Francisco Vilmar Cardoso Ruviaro <[email protected]>
3 Forwarded: not-needed
4 Last-Update: 2024-08-06
5
6 --- a/modules/update/update.go
7 +++ b/modules/update/update.go
8 @@ -1,17 +1,14 @@
9 package update
10
11 import (
12 - "context"
13 "math"
14 "strconv"
15 "strings"
16
17 - "github.com/bettercap/bettercap/core"
18 "github.com/bettercap/bettercap/session"
19
20 "github.com/google/go-github/github"
21
22 - "github.com/evilsocket/islazy/tui"
23 )
24
25 type UpdateModule struct {
26 @@ -81,17 +78,6 @@ func (mod *UpdateModule) Start() error {
27 return mod.SetRunning(true, func() {
28 defer mod.SetRunning(false, nil)
29
30 - mod.Info("checking latest stable release ...")
31 -
32 - if releases, _, err := mod.client.Repositories.ListReleases(context.Background(), "bettercap", "bettercap", nil); err == nil {
33 - latest := releases[0]
34 - if mod.versionToNum(core.Version) < mod.versionToNum(*latest.TagName) {
35 - mod.Session.Events.Add("update.available", latest)
36 - } else {
37 - mod.Info("you are running %s which is the latest stable version.", tui.Bold(core.Version))
38 - }
39 - } else {
40 - mod.Error("error while fetching latest release info from GitHub: %s", err)
41 - }
42 + mod.Info("this command is inactive in Debian.")
43 })
44 }