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
This commit is contained in:
commit
8a40cb1e5a
@ -709,7 +709,7 @@ sub ncores {
|
||||
# Windows
|
||||
return $ENV{NUMBER_OF_PROCESSORS} if exists($ENV{NUMBER_OF_PROCESSORS});
|
||||
# Linux / MSYS2 / Cygwin / WSL
|
||||
do { local @ARGV='/proc/cpuinfo'; return scalar(grep(/^processor\s*:/, <>)); } if -r '/proc/cpuinfo';
|
||||
do { local @ARGV='/proc/cpuinfo'; return scalar(grep(/^processor[\s\d]*:/, <>)); } if -r '/proc/cpuinfo';
|
||||
# macOS & BSD
|
||||
return qx/sysctl -n hw.ncpu/ if $^O =~ /(?:^darwin$|bsd)/;
|
||||
return 1;
|
||||
|
Loading…
Reference in New Issue
Block a user