From a7485d587ab0f4692fb16202172f6443cff7a49e Mon Sep 17 00:00:00 2001 From: Ophestra Date: Sat, 20 Jun 2026 01:44:16 +0900 Subject: cmd/app: pass user-specified arguments An extra argument is added to pad out argv0. Signed-off-by: Ophestra --- cmd/app/run.go | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) (limited to 'cmd/app/run.go') diff --git a/cmd/app/run.go b/cmd/app/run.go index 16f8b885..b8512579 100644 --- a/cmd/app/run.go +++ b/cmd/app/run.go @@ -12,7 +12,12 @@ import ( ) // run starts a container via cmd/hakurei and returns after it terminates. -func run(ctx context.Context, msg message.Msg, config *hst.Config) error { +func run( + ctx context.Context, + msg message.Msg, + config *hst.Config, + args ...string, +) error { c, cancel := context.WithCancel(ctx) defer cancel() @@ -25,6 +30,7 @@ func run(ctx context.Context, msg message.Msg, config *hst.Config) error { cmd.Args = append(cmd.Args, "-v") } cmd.Args = append(cmd.Args, "run", "3") + cmd.Args = append(cmd.Args, args...) r, w, err := os.Pipe() if err != nil { -- cgit v1.3.1