Skip to content

Commit cb4a13a

Browse files
committed
add --stage flag to up run
1 parent e004cb4 commit cb4a13a

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

internal/cli/run/run.go

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@ func init() {
1414
cmd.Example(`up run clean`, "Run clean hook.")
1515

1616
hook := cmd.Arg("hook", "Name of the hook to run.").Required().String()
17+
stage := cmd.Flag("stage", "Target stage name.").Short('s').Default("staging").String()
1718

1819
cmd.Action(func(_ *kingpin.ParseContext) error {
1920
_, p, err := root.Init()
@@ -27,6 +28,10 @@ func init() {
2728
"name": *hook,
2829
})
2930

31+
if err := p.Init(*stage); err != nil {
32+
return errors.Wrap(err, "initializing")
33+
}
34+
3035
return p.RunHook(*hook)
3136
})
3237
}

0 commit comments

Comments
 (0)