Skip to content

Commit

Permalink
Call apt-get update before listing cache
Browse files Browse the repository at this point in the history
  • Loading branch information
raoulh committed Oct 29, 2023
1 parent 8f1572c commit b46a235
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions models/update.go
Original file line number Diff line number Diff line change
Expand Up @@ -92,6 +92,11 @@ func checkForUpdates() error {
}

logging.Infoln("Checking dpkg updates")

//Update apt cache without interaction
out, _ := RunCommand("apt-get", "update", "-qq")
logging.Debugln("apt-get update output:", out)

pkgs := apt.GetCachePackages()
for _, p := range pkgs {
logging.Infof("%s: %s --> %s\n", p.Name, p.VersionCurrent, p.VersionNew)
Expand Down

0 comments on commit b46a235

Please sign in to comment.