remove cobra dependency for agent

This commit is contained in:
Henry Dollman
2024-08-11 15:54:27 -04:00
parent c06eabefe0
commit 4105567051
2 changed files with 2 additions and 3 deletions

View File

@@ -22,7 +22,7 @@ func main() {
app.RootCmd.AddCommand(&cobra.Command{ app.RootCmd.AddCommand(&cobra.Command{
Use: "update", Use: "update",
Short: "Update " + beszel.AppName + " to the latest version", Short: "Update " + beszel.AppName + " to the latest version",
Run: update.UpdateBeszel, Run: func(_ *cobra.Command, _ []string) { update.UpdateBeszel() },
}) })
hubApp := hub.NewHub(app) hubApp := hub.NewHub(app)

View File

@@ -8,10 +8,9 @@ import (
"github.com/blang/semver" "github.com/blang/semver"
"github.com/rhysd/go-github-selfupdate/selfupdate" "github.com/rhysd/go-github-selfupdate/selfupdate"
"github.com/spf13/cobra"
) )
func UpdateBeszel(cmd *cobra.Command, args []string) { func UpdateBeszel() {
var latest *selfupdate.Release var latest *selfupdate.Release
var found bool var found bool
var err error var err error