diff --git a/cmd/cmd.go b/cmd/cmd.go index fce492a..d396779 100644 --- a/cmd/cmd.go +++ b/cmd/cmd.go @@ -43,7 +43,6 @@ func init() { // Execute is the entry point for the command package func Execute() { if err := rootCmd.Execute(); err != nil { - rootCmd.PrintErr(err) // can't use PrintErrln or PrintErrf due to a bug https://github.com/spf13/cobra/pull/894 os.Exit(1) } } diff --git a/test/e2e-cli.bats b/test/e2e-cli.bats index 04a8f01..39acf2c 100755 --- a/test/e2e-cli.bats +++ b/test/e2e-cli.bats @@ -9,19 +9,19 @@ rootDir="./test/fixtures" echo $exe >&3 run2 "$exe" --foo [ $status -eq 1 ] - [[ "$stderr" == "unknown flag: --foo" ]] + [[ "$stderr" == "Error: unknown flag: --foo"* ]] } @test "invalid args 2" { run2 "$exe" get --foo [ $status -eq 1 ] - [[ "$stderr" == "Error invoking kubectl"* ]] + [[ "$stderr" == "Error: Error invoking kubectl"* ]] } @test "invalid args 3" { run2 "$exe" foo [ $status -eq 1 ] - [[ "$stderr" == 'unknown command "foo" for "kubectl-neat"' ]] + [[ "$stderr" == 'Error: unknown command "foo" for "kubectl-neat"'* ]] } @test "local file" {