1
0
forked from rosa/hakurei

cmd/app: pass user-specified arguments

An extra argument is added to pad out argv0.

Signed-off-by: Ophestra <cat@gensokyo.uk>
This commit is contained in:
2026-06-20 01:44:16 +09:00
parent 4892beefc1
commit a7485d587a
4 changed files with 11 additions and 4 deletions
+2 -2
View File
@@ -148,7 +148,7 @@ func main() {
c.NewCommand(
"run", "Start the named application",
func(args []string) error {
if len(args) != 1 {
if len(args) < 1 {
dents, err := os.ReadDir(base.Append("app").String())
if err != nil {
return err
@@ -197,7 +197,7 @@ func main() {
config.Container.Args[2] = flagCommand
}
return run(ctx, msg, config)
return run(ctx, msg, config, args[1:]...)
},
).
Flag(