cmd/mbf: register binfmt entry for shell
Test / Create distribution (push) Successful in 58s
Test / Sandbox (push) Successful in 2m42s
Test / Hakurei (push) Successful in 3m56s
Test / ShareFS (push) Successful in 3m55s
Test / Sandbox (race detector) (push) Successful in 5m36s
Test / Hakurei (race detector) (push) Successful in 6m36s
Test / Flake checks (push) Successful in 1m16s

This fixes --arch for shell.

Signed-off-by: Ophestra <cat@gensokyo.uk>
This commit is contained in:
2026-06-10 12:51:09 +09:00
parent 928a9f61e9
commit f333b8fbd6
+7
View File
@@ -1052,6 +1052,13 @@ func main() {
Bind(tempdir, fhs.AbsTmp, std.BindWritable).
Proc(fhs.AbsProc).Dev(fhs.AbsDev, true)
if flagArch != "" && flagArch != runtime.GOARCH {
if entry, ok := pkg.Arch()[flagArch]; ok {
z.InitAsRoot = true
z.Binfmt = []container.BinfmtEntry{entry}
}
}
if err := z.Start(); err != nil {
return err
}