Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix documentation of "--quiet" flag to reflect behavior #314

Merged
merged 1 commit into from
Jul 7, 2020
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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