Добавление возможности обновления системным пакетным менеджером при alr up
All checks were successful
Pre-commit / pre-commit (push) Successful in 5m39s
All checks were successful
Pre-commit / pre-commit (push) Successful in 5m39s
This commit is contained in:
@@ -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 {
|
||||
|
Reference in New Issue
Block a user