Silence usage message on runtime error
This commit is contained in:
parent
d2cf57dcd9
commit
67f81d2728
4
main.go
4
main.go
|
@ -77,6 +77,10 @@ func init() {
|
|||
}
|
||||
|
||||
func run(c *cobra.Command, args []string) error {
|
||||
// if we got past argument passing, then returned errors are runtime
|
||||
// things (like file not found) that shouldn't trigger a usage message.
|
||||
c.SilenceUsage = true
|
||||
|
||||
display = NewDisplay(noColour)
|
||||
|
||||
if len(searchRegexp) == 0 && len(searchFixed) == 0 {
|
||||
|
|
Loading…
Reference in New Issue