Skip to content

Commit

Permalink
Merge pull request #314 from nmiyake/updateQuietDocs
Browse files Browse the repository at this point in the history
Fix documentation of "--quiet" flag to reflect behavior
  • Loading branch information
LandonTClipp authored Jul 7, 2020
2 parents 0aed05c + dbae349 commit 7252eee
Showing 1 changed file with 2 additions and 4 deletions.
6 changes: 2 additions & 4 deletions cmd/mockery.go
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@ import (
"regexp"
"runtime/pprof"
"strings"
"syscall"
"time"

homedir "github.com/mitchellh/go-homedir"
Expand Down Expand Up @@ -80,7 +79,7 @@ func init() {
pFlags.String("note", "", "comment to insert into prologue of each generated file")
pFlags.String("cpuprofile", "", "write cpu profile to file")
pFlags.Bool("version", false, "prints the installed version of mockery")
pFlags.Bool("quiet", false, "suppress output to stdout")
pFlags.Bool("quiet", false, `suppresses logger output (equivalent to --log-level="")`)
pFlags.Bool("keeptree", false, "keep the tree structure of the original interface files into a different repository. Must be used with XX")
pFlags.String("tags", "", "space-separated list of additional build tags to use")
pFlags.String("filename", "", "name of generated file (only works with -name and no regex)")
Expand Down Expand Up @@ -139,8 +138,7 @@ func (r *RootApp) Run() error {
var limitOne bool

if r.Quiet {
// if "quiet" flag is set, set os.Stdout to /dev/null to suppress all output to Stdout
os.Stdout = os.NewFile(uintptr(syscall.Stdout), os.DevNull)
// if "quiet" flag is set, disable logging
r.Config.LogLevel = ""
}

Expand Down

0 comments on commit 7252eee

Please sign in to comment.