1
0
Fork 0
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:
Joshua Spence 2015-11-20 10:27:21 +11:00
parent 581829a99e
commit 187e10e781

View file

@ -35,7 +35,7 @@ final class ArcanistRubyLinter extends ArcanistExternalLinter {
list($stdout) = execx('%C --version', $this->getExecutableCommand());
$matches = array();
$regex = '/^ruby (?P<version>\d+\.\d+\.\d+)p\d+/';
$regex = '/^ruby (?P<version>\d+\.\d+\.\d+)+/';
if (preg_match($regex, $stdout, $matches)) {
return $matches['version'];
} else {