This commit is contained in:
2025-04-15 00:20:57 +03:00
parent 613dc41fdf
commit fe3acf5b85
6 changed files with 126 additions and 118 deletions

View File

@@ -23,7 +23,6 @@ import (
"context"
"fmt"
"log/slog"
"os"
"github.com/leonelquinteros/gotext"
"github.com/urfave/cli/v2"
@@ -92,12 +91,10 @@ func UpgradeCmd() *cli.Command {
mgr := manager.Detect()
if mgr == nil {
slog.Error(gotext.Get("Unable to detect a supported package manager on the system"))
os.Exit(1)
return cliutils.FormatCliExit(gotext.Get("Unable to detect a supported package manager on the system"), nil)
}
if cfg.AutoPull() {
slog.Debug("autopull")
err = rs.Pull(ctx, cfg.Repos())
if err != nil {
return cliutils.FormatCliExit(gotext.Get("Error pulling repos"), err)