fix: broken logline in --search

Resolves a malformed logging statement in `cmd_search` which would never
actually write to stderr.
This commit is contained in:
Chris Lane 2019-11-16 09:18:45 -05:00
parent 9a6130b6b7
commit eab3c14f1f

View File

@ -55,7 +55,7 @@ func cmdSearch(opts map[string]interface{}, conf config.Config) {
// compile the regex
reg, err := regexp.Compile(pattern)
if err != nil {
fmt.Errorf("failed to compile regexp: %s, %v", pattern, err)
fmt.Fprintln(os.Stderr, fmt.Sprintf("failed to compile regexp: %s, %v", pattern, err))
os.Exit(1)
}