From f06d7fd387d5b3b3e03f1795e5e3538067462419 Mon Sep 17 00:00:00 2001 From: Ophestra Date: Wed, 21 Jan 2026 05:18:08 +0900 Subject: [PATCH] cmd/mbf: expose some artifacts for curing This will remain until dist is successfully bootstrapped. Signed-off-by: Ophestra --- cmd/mbf/main.go | 31 +++++++++++++++++++++++++++++++ 1 file changed, 31 insertions(+) diff --git a/cmd/mbf/main.go b/cmd/mbf/main.go index 7a0a78e..d80d0a7 100644 --- a/cmd/mbf/main.go +++ b/cmd/mbf/main.go @@ -136,6 +136,37 @@ func main() { }, ) + c.NewCommand( + "cure", + "Cure the named artifact and show its path", + func(args []string) error { + if len(args) != 1 { + return errors.New("cure requires 1 argument") + } + var a pkg.Artifact + switch args[0] { + case "busybox": + a = rosa.Std.NewBusybox() + case "musl": + a = rosa.Std.NewMusl(nil) + case "go": + a = rosa.Std.NewGo() + case "rsync": + a = rosa.Std.NewRsync() + + default: + return fmt.Errorf("unsupported artifact %q", args[0]) + } + + pathname, _, err := cache.Cure(a) + if err == nil { + log.Println(pathname) + } + return err + + }, + ) + c.MustParse(os.Args[1:], func(err error) { if cache != nil { cache.Close()