Skip to content

Commit c208821

Browse files
committed
plugins: split combined error report into 2 lines for easier parsing, replace path seps
1 parent e8f27c5 commit c208821

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

cmd/protolock/plugins.go

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -127,5 +127,8 @@ func runPlugins(pluginList string, report *protolock.Report) (*protolock.Report,
127127
}
128128

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

0 commit comments

Comments
 (0)