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 81264f74..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: @@ -268,6 +269,7 @@ stacks: noPkgManager: "No package manager specified." pkgManagerDoesNotExist: "The specified package manager does not exist. Create it with 'apx pkgmanagers new' or contact the system administrator." + builtIn: "Built-in stacks cannot be modified." info: askBase: "Type a new base or confirm the current one (%s):" askPkgManager: "Choose a new package manager or confirm the current one (%s):"