Skip to content

Commit 9aff900

Browse files
committed
add shortcut flag to submit
1 parent 1749430 commit 9aff900

File tree

2 files changed

+3
-1
lines changed

2 files changed

+3
-1
lines changed

cmd/run.go

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@ import (
77
func init() {
88
rootCmd.AddCommand(runCmd)
99
runCmd.Flags().StringVarP(&submitBaseURL, "baseurl", "b", "", "set the base URL for HTTP tests, overriding any default")
10+
runCmd.Flags().BoolVarP(&forceSubmit, "submit", "s", false, "shortcut flag to submit instead of run")
1011
}
1112

1213
// runCmd represents the run command

cmd/submit.go

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@ import (
1010
)
1111

1212
var submitBaseURL string
13+
var forceSubmit bool
1314

1415
func init() {
1516
rootCmd.AddCommand(submitCmd)
@@ -27,7 +28,7 @@ var submitCmd = &cobra.Command{
2728

2829
func submissionHandler(cmd *cobra.Command, args []string) error {
2930
cmd.SilenceUsage = true
30-
isSubmit := cmd.Name() == "submit"
31+
isSubmit := cmd.Name() == "submit" || forceSubmit
3132
lessonUUID := args[0]
3233
optionalPositionalArgs := []string{}
3334
if len(args) > 1 {

0 commit comments

Comments
 (0)