Page MenuHomePhabricator

D11264.id27061.diff
No OneTemporary

D11264.id27061.diff

diff --git a/src/lint/linter/ArcanistPhpLinter.php b/src/lint/linter/ArcanistPhpLinter.php
--- a/src/lint/linter/ArcanistPhpLinter.php
+++ b/src/lint/linter/ArcanistPhpLinter.php
@@ -39,15 +39,12 @@
}
public function getVersion() {
- list($stdout) = execx('%C --version', $this->getExecutableCommand());
+ list($stdout) = execx(
+ '%C --run %s',
+ $this->getExecutableCommand(),
+ 'echo phpversion();');
+ return $stdout;
- $matches = array();
- $regex = '/^PHP (?P<version>\d+\.\d+\.\d+)\b/';
- if (preg_match($regex, $stdout, $matches)) {
- return $matches['version'];
- } else {
- return false;
- }
}
public function shouldExpectCommandErrors() {

File Metadata

Mime Type
text/plain
Expires
Tue, Mar 25, 5:45 AM (1 w, 19 h ago)
Storage Engine
blob
Storage Format
Encrypted (AES-256-CBC)
Storage Handle
7721505
Default Alt Text
D11264.id27061.diff (718 B)

Event Timeline