Skip to content

Commit

Permalink
Exit with a non-zero status on cmd execution errors (#774)
Browse files Browse the repository at this point in the history
  • Loading branch information
jvrplmlmn authored Oct 5, 2022
1 parent 51b69c5 commit f590ad4
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions cmd/tk/main.go
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
package main

import (
"fmt"
"os"
"strings"

"github.com/go-clix/cli"
"github.com/rs/zerolog"
"github.com/rs/zerolog/log"
"golang.org/x/term"

"github.com/grafana/tanka/pkg/tanka"
Expand Down Expand Up @@ -71,6 +71,6 @@ func main() {

// Run!
if err := rootCmd.Execute(); err != nil {
fmt.Fprintln(os.Stderr, "Error:", err)
log.Fatal().Msgf("Error: %s", err)
}
}

0 comments on commit f590ad4

Please sign in to comment.