Skip to content

Commit 8a40cb1

Browse files
committed
Merge branch 'ah/chainlint-cpuinfo-parse-fix'
The format of a line in /proc/cpuinfo that describes a CPU on s390x looked different from everybody else, and the code in chainlint.pl failed to parse it. * ah/chainlint-cpuinfo-parse-fix: chainlint.pl: fix /proc/cpuinfo regexp
2 parents f32996d + 1f51b77 commit 8a40cb1

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

t/chainlint.pl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -709,7 +709,7 @@ sub ncores {
709709
# Windows
710710
return $ENV{NUMBER_OF_PROCESSORS} if exists($ENV{NUMBER_OF_PROCESSORS});
711711
# Linux / MSYS2 / Cygwin / WSL
712-
do { local @ARGV='/proc/cpuinfo'; return scalar(grep(/^processor\s*:/, <>)); } if -r '/proc/cpuinfo';
712+
do { local @ARGV='/proc/cpuinfo'; return scalar(grep(/^processor[\s\d]*:/, <>)); } if -r '/proc/cpuinfo';
713713
# macOS & BSD
714714
return qx/sysctl -n hw.ncpu/ if $^O =~ /(?:^darwin$|bsd)/;
715715
return 1;

0 commit comments

Comments
 (0)