Skip to content

Commit

Permalink
Fixed error going to stderr, -s not being verbose without -q
Browse files Browse the repository at this point in the history
  • Loading branch information
greg-szabo committed May 28, 2021
1 parent 33a4393 commit f5dab84
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 2 deletions.
2 changes: 1 addition & 1 deletion defaults/defaults.go
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package defaults

// Application version
const Version = "0.6.2"
const Version = "0.7.0"
5 changes: 4 additions & 1 deletion exit/exit.go
Original file line number Diff line number Diff line change
Expand Up @@ -11,13 +11,16 @@ var Strict bool

func Fail(err error) {
if !Quiet {
fmt.Println(err)
fmt.Fprintln(os.Stderr, err)
}
os.Exit(1)
}

func Succeed(result string) {
if Strict && strings.TrimSpace(result) == "" {
if !Quiet {
fmt.Fprintln(os.Stderr, "missing or empty field")
}
os.Exit(1)
}
fmt.Print(result)
Expand Down

0 comments on commit f5dab84

Please sign in to comment.