cmd/app: enforce mutable instance exclusion
Test / Create distribution (push) Successful in 55s
Test / Sandbox (push) Successful in 2m47s
Test / ShareFS (push) Successful in 3m46s
Test / Hakurei (push) Successful in 3m57s
Test / Sandbox (race detector) (push) Successful in 5m31s
Test / Hakurei (race detector) (push) Successful in 6m39s
Test / Flake checks (push) Successful in 1m7s

This avoids invoking undefined behaviour in the underlying overlay filesystem implementation.

Signed-off-by: Ophestra <cat@gensokyo.uk>
This commit is contained in:
2026-06-21 01:51:24 +09:00
parent cd493fd95f
commit 218f7fa345
4 changed files with 132 additions and 3 deletions
+9 -1
View File
@@ -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)
}