From: Christian Weiske Date: Tue, 8 Jul 2014 04:55:57 +0000 (+0200) Subject: fix git version detection on OSX X-Git-Tag: v0.4.0~10 X-Git-Url: https://git.cweiske.de/phorkie.git/commitdiff_plain/583c94a962d155468bb848d00aab5fe5d6eb95c8?ds=inline fix git version detection on OSX --- diff --git a/src/phorkie/SetupCheck.php b/src/phorkie/SetupCheck.php index 557d85c..c4d365c 100644 --- a/src/phorkie/SetupCheck.php +++ b/src/phorkie/SetupCheck.php @@ -101,8 +101,9 @@ class SetupCheck if ($retval !== 0) { $this->fail('Running git executable failed.'); } - if (!preg_match('#^git version ([0-9.]+(rc[0-9]+)?)$#', $line, $matches)) { + if (!preg_match('#^git version ([0-9.]+(rc[0-9]+)?)(?: \(Apple Git-\d+\))?$#', $line, $matches)) { $this->fail('git version output format unexpected: ' . $line); + return; } if (version_compare($matches[1], '1.7.5') < 0) { $this->fail(