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
+11 -2
View File
@@ -128,7 +128,12 @@ func main() {
config.Container.Home = a
}
return run(ctx, msg, &config)
remove, err := acquireTemplate(base, args[0])
if err != nil {
return err
}
err = run(ctx, msg, &config)
return errors.Join(err, remove())
},
).Flag(
&flagShell,
@@ -180,7 +185,8 @@ func main() {
r = io.MultiReader(f, common)
}
config, err = parse(args[0], base, r)
var name string
config, err = parse(args[0], base, r, &name)
if closeErr := f.Close(); err == nil {
err = closeErr
}
@@ -197,6 +203,9 @@ func main() {
config.Container.Args[2] = flagCommand
}
if err = enterTemplate(base, name); err != nil {
return err
}
return run(ctx, msg, config, args[1:]...)
},
).