Skip to content

Commit d52a4d3

Browse files
authored
Fix version subcommand. Do not print usage if run subcommand fails. (cucumber#475)
* Fix version subcommand. Do not print usage if run subcommand fails. * Remove newline to clean up PR diff
1 parent 5793a95 commit d52a4d3

File tree

2 files changed

+3
-1
lines changed

2 files changed

+3
-1
lines changed

cmd/godog/internal/cmd_run.go

+2-1
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,8 @@ buildable go source.`,
3232
feature (*.feature)
3333
scenario at specific line (*.feature:10)
3434
If no feature arguments are supplied, godog will use "features/" by default.`,
35-
RunE: runCmdRunFunc,
35+
RunE: runCmdRunFunc,
36+
SilenceUsage: true,
3637
}
3738

3839
flags.BindRunCmdFlags("", runCmd.Flags(), &opts)

cmd/godog/internal/cmd_version.go

+1
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@ func CreateVersionCmd() cobra.Command {
1414
versionCmd := cobra.Command{
1515
Use: "version",
1616
Short: "Show current version",
17+
Run: versionCmdRunFunc,
1718
Version: godog.Version,
1819
}
1920

0 commit comments

Comments
 (0)