Skip to content

Commit

Permalink
Fix version subcommand. Do not print usage if run subcommand fails. (#…
Browse files Browse the repository at this point in the history
…475)

* Fix version subcommand. Do not print usage if run subcommand fails.

* Remove newline to clean up PR diff
  • Loading branch information
coopernurse committed May 20, 2022
1 parent 5793a95 commit d52a4d3
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 1 deletion.
3 changes: 2 additions & 1 deletion cmd/godog/internal/cmd_run.go
Expand Up @@ -32,7 +32,8 @@ buildable go source.`,
feature (*.feature)
scenario at specific line (*.feature:10)
If no feature arguments are supplied, godog will use "features/" by default.`,
RunE: runCmdRunFunc,
RunE: runCmdRunFunc,
SilenceUsage: true,
}

flags.BindRunCmdFlags("", runCmd.Flags(), &opts)
Expand Down
1 change: 1 addition & 0 deletions cmd/godog/internal/cmd_version.go
Expand Up @@ -14,6 +14,7 @@ func CreateVersionCmd() cobra.Command {
versionCmd := cobra.Command{
Use: "version",
Short: "Show current version",
Run: versionCmdRunFunc,
Version: godog.Version,
}

Expand Down

0 comments on commit d52a4d3

Please sign in to comment.