mirror of
https://we.phorge.it/source/arcanist.git
synced 2025-01-22 20:51:09 +01:00
Fix parsing of ruby
version for ArcanistRubyLinter
Summary: This fails to extract the version correctly locally. ``` > ruby --version ruby 1.8.7 (2014-01-28 patchlevel 376) [x86_64-linux] ``` Test Plan: `arc unit` Reviewers: epriestley, #blessed_reviewers Reviewed By: epriestley, #blessed_reviewers Subscribers: Korvin Differential Revision: https://secure.phabricator.com/D14525
This commit is contained in:
parent
581829a99e
commit
187e10e781
1 changed files with 1 additions and 1 deletions
|
@ -35,7 +35,7 @@ final class ArcanistRubyLinter extends ArcanistExternalLinter {
|
||||||
list($stdout) = execx('%C --version', $this->getExecutableCommand());
|
list($stdout) = execx('%C --version', $this->getExecutableCommand());
|
||||||
|
|
||||||
$matches = array();
|
$matches = array();
|
||||||
$regex = '/^ruby (?P<version>\d+\.\d+\.\d+)p\d+/';
|
$regex = '/^ruby (?P<version>\d+\.\d+\.\d+)+/';
|
||||||
if (preg_match($regex, $stdout, $matches)) {
|
if (preg_match($regex, $stdout, $matches)) {
|
||||||
return $matches['version'];
|
return $matches['version'];
|
||||||
} else {
|
} else {
|
||||||
|
|
Loading…
Reference in a new issue