diff options
| author | Ophestra <cat@gensokyo.uk> | 2026-06-20 01:44:16 +0900 |
|---|---|---|
| committer | Ophestra <cat@gensokyo.uk> | 2026-06-20 01:44:47 +0900 |
| commit | a7485d587ab0f4692fb16202172f6443cff7a49e (patch) | |
| tree | 92e99ea91346f7b051e59ea357a7d6b6d3000670 /cmd/app/run.go | |
| parent | 4892beefc18d409dcb99b27e0980df4537cad692 (diff) | |
cmd/app: pass user-specified arguments
An extra argument is added to pad out argv0.
Signed-off-by: Ophestra <cat@gensokyo.uk>
Diffstat (limited to 'cmd/app/run.go')
| -rw-r--r-- | cmd/app/run.go | 8 |
1 files changed, 7 insertions, 1 deletions
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 { |
