Add a quiet flag#12
Conversation
| fmt.Println(arg) | ||
| if !quiet { | ||
| fmt.Println(arg) | ||
| } |
There was a problem hiding this comment.
If there is an error, would it possible to still print the command? It makes it easier to debug generation issues.
There was a problem hiding this comment.
Ya, that makes sense to me. The error would be any error that occurs after this line, right?
I could handle it by adding something like this:
} else {
log.SetPrefix(fmt.Sprintf("command %s", arg))
}but that might make for some strange log messages.
Another option would be moving everything below this out into a new function which returns errors instead of log.Fatal() and adding the extra text here in the if err != nil.
WDYT?
There was a problem hiding this comment.
Looking at it again, I guess it's really only the protoc.run() error that needs to be handled, so I added a log.Println(err) to that if block.
Signed-off-by: Daniel Nephin <[email protected]>
c88b26a to
0fd0124
Compare
|
ping |
|
LGTM |
Add a quiet flag
To suppress verbose output