Skip to content

Commit

Permalink
plugins: split combined error report into 2 lines for easier parsing,…
Browse files Browse the repository at this point in the history
… replace path seps
  • Loading branch information
nilslice committed Jul 11, 2019
1 parent e8f27c5 commit c208821
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion cmd/protolock/plugins.go
Original file line number Diff line number Diff line change
Expand Up @@ -127,5 +127,8 @@ func runPlugins(pluginList string, report *protolock.Report) (*protolock.Report,
}

func wrapPluginErr(name, path string, err error, output []byte) error {
return fmt.Errorf("%s: %v (%s) %s", name, err, path, string(output))
out := strings.ReplaceAll(
string(output), protolock.ProtoSep, protolock.FileSep,
)
return fmt.Errorf("%s (%s): %v\n%s", name, path, err, out)
}

0 comments on commit c208821

Please sign in to comment.