From 218f7fa34565a8cfdf93824cd6d69f04b3cd4141 Mon Sep 17 00:00:00 2001 From: Ophestra Date: Sun, 21 Jun 2026 01:51:24 +0900 Subject: cmd/app: enforce mutable instance exclusion This avoids invoking undefined behaviour in the underlying overlay filesystem implementation. Signed-off-by: Ophestra --- cmd/app/app.go | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) (limited to 'cmd/app/app.go') diff --git a/cmd/app/app.go b/cmd/app/app.go index 9fa49696..a8508676 100644 --- a/cmd/app/app.go +++ b/cmd/app/app.go @@ -31,7 +31,12 @@ func parsePair(s string) (source, target *check.Absolute, err error) { // parse decodes a high-level configuration stream and returns its // corresponding [hst.Config]. -func parse(id string, base *check.Absolute, r io.Reader) (*hst.Config, error) { +func parse( + id string, + base *check.Absolute, + r io.Reader, + templateP *string, +) (*hst.Config, error) { shell := fhs.AbsRoot.Append("bin", "zsh") home := hst.AbsPrivateTmp.Append("home") @@ -99,6 +104,9 @@ func parse(id string, base *check.Absolute, r io.Reader) (*hst.Config, error) { } else if v, err := strconv.Atoi(identity); err != nil { return nil, err } else { + if templateP != nil { + *templateP = template + } c.Identity = v root.Upper = base.Append("template", template) } -- cgit v1.3.1