diff --git a/cmd/pkgManagers.go b/cmd/pkgManagers.go index 1039d900..fadedf4c 100644 --- a/cmd/pkgManagers.go +++ b/cmd/pkgManagers.go @@ -675,6 +675,11 @@ func updatePkgManager(cmd *cobra.Command, args []string) error { return error } + if pkgmanager.BuiltIn { + cmdr.Error.Println(apx.Trans("pkgmanagers.update.error.builtIn")) + os.Exit(126) + } + if autoRemove == "" { if !assumeYes { cmdr.Info.Printfln(apx.Trans("pkgmanagers.update.info.askNewCommand"), "autoRemove", pkgmanager.CmdAutoRemove) diff --git a/locales/en.yml b/locales/en.yml index d3575b48..d32f63ac 100644 --- a/locales/en.yml +++ b/locales/en.yml @@ -168,6 +168,7 @@ pkgmanagers: error: noName: "No name specified." missingCommand: "Missing command for %s." + builtIn: "Built-in package managers cannot be modified." rm: description: "Remove the specified package manager." error: