Skip to content

Commit 3cc550b

Browse files
committed
fix:[Vanilla-OS#384] disallow updating built-in stacks
- throw error if stack is built-in - add english translation for update built-in stack error
1 parent 32b3a31 commit 3cc550b

File tree

2 files changed

+6
-0
lines changed

2 files changed

+6
-0
lines changed

cmd/stacks.go

+5
Original file line numberDiff line numberDiff line change
@@ -407,6 +407,11 @@ func updateStack(cmd *cobra.Command, args []string) error {
407407
return error
408408
}
409409

410+
if stack.BuiltIn {
411+
cmdr.Error.Println(apx.Trans("stacks.update.error.builtIn"))
412+
return nil
413+
}
414+
410415
if base == "" {
411416
if !assumeYes {
412417
cmdr.Info.Printfln(apx.Trans("stacks.update.info.askBase"), stack.Base)

locales/en.yml

+1
Original file line numberDiff line numberDiff line change
@@ -268,6 +268,7 @@ stacks:
268268
noPkgManager: "No package manager specified."
269269
pkgManagerDoesNotExist: "The specified package manager does not exist. Create
270270
it with 'apx pkgmanagers new' or contact the system administrator."
271+
builtIn: "Built-in stacks cannot be modified."
271272
info:
272273
askBase: "Type a new base or confirm the current one (%s):"
273274
askPkgManager: "Choose a new package manager or confirm the current one (%s):"

0 commit comments

Comments
 (0)