Fix version subcommand. Do not print usage if run subcommand fails. (#475)

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

* Remove newline to clean up PR diff
Этот коммит содержится в:
James Cooper 2022-05-20 05:18:09 -07:00 коммит произвёл GitHub
родитель 5793a95e1c
коммит d52a4d3f4d
Не найден ключ, соответствующий данной подписи
Идентификатор ключа GPG: 4AEE18F83AFDEB23
2 изменённых файлов: 3 добавлений и 1 удалений

Просмотреть файл

@ -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)

Просмотреть файл

@ -14,6 +14,7 @@ func CreateVersionCmd() cobra.Command {
versionCmd := cobra.Command{
Use: "version",
Short: "Show current version",
Run: versionCmdRunFunc,
Version: godog.Version,
}