Commit 37c531f5 authored by Russ Cox's avatar Russ Cox

errchk: fix build - allow matches in multiline error messages

TBR=r
CC=golang-dev
https://golang.org/cl/1734042
parent a212d174
......@@ -31,7 +31,12 @@ close(SRC);
# Run command
$cmd = join(' ', @ARGV);
open(CMD, "exec $cmd </dev/null 2>&1 |") || die "BUG: errchk: run $cmd: $!";
@out = grep { !/^ / } <CMD>;
# 6g error messages continue onto additional lines with leading tabs.
# Split the output at the beginning of each line that doesn't begin with a tab.
$out = join('', <CMD>);
@out = split(/^(?!\t)/m, $out);
close CMD;
if($? == 0) {
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment