Добавление возможности обновления системным пакетным менеджером при alr up
All checks were successful
Pre-commit / pre-commit (push) Successful in 5m39s

This commit is contained in:
2025-08-28 12:03:14 +03:00
parent b852688ab0
commit 9783ce37de
5 changed files with 83 additions and 7 deletions

View File

@@ -76,6 +76,7 @@ var configKeys = []string{
"autoPull",
"logLevel",
"ignorePkgUpdates",
"updateSystemOnUpgrade",
}
func SetConfig() *cli.Command {
@@ -137,6 +138,12 @@ func SetConfig() *cli.Command {
}
}
deps.Cfg.System.SetIgnorePkgUpdates(updates)
case "updateSystemOnUpgrade":
boolValue, err := strconv.ParseBool(value)
if err != nil {
return cliutils.FormatCliExit(gotext.Get("invalid boolean value for %s: %s", key, value), err)
}
deps.Cfg.System.SetUpdateSystemOnUpgrade(boolValue)
case "repo", "repos":
return cliutils.FormatCliExit(gotext.Get("use 'repo add/remove' commands to manage repositories"), nil)
default:
@@ -206,6 +213,8 @@ func GetConfig() *cli.Command {
} else {
fmt.Println(strings.Join(updates, ", "))
}
case "updateSystemOnUpgrade":
fmt.Println(deps.Cfg.UpdateSystemOnUpgrade())
case "repo", "repos":
repos := deps.Cfg.Repos()
if len(repos) == 0 {