internal/outcome/process: output via msg

This makes it possible to instrument output behaviour through stub.

Signed-off-by: Ophestra <cat@gensokyo.uk>
This commit is contained in:
2025-10-30 03:34:24 +09:00
parent eeb9f98e5b
commit 36f8064905
3 changed files with 20 additions and 13 deletions

View File

@@ -3,7 +3,6 @@ package outcome
import (
"context"
"log"
"os"
"hakurei.app/hst"
"hakurei.app/message"
@@ -18,8 +17,8 @@ func Main(ctx context.Context, msg message.Msg, config *hst.Config) {
seal := outcome{syscallDispatcher: direct{msg}}
if err := seal.finalise(ctx, msg, &id, config); err != nil {
printMessageError("cannot seal app:", err)
os.Exit(1)
printMessageError(msg.GetLogger().Fatalln, "cannot seal app:", err)
panic("unreachable")
}
seal.main(msg)