mirror of
https://github.com/golang/go
synced 2024-11-21 13:24:40 -07:00
errchk: fix build - allow matches in multiline error messages
TBR=r CC=golang-dev https://golang.org/cl/1734042
This commit is contained in:
parent
a212d174ac
commit
37c531f51f
@ -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) {
|
||||
|
Loading…
Reference in New Issue
Block a user