Page Menu
Home
Phabricator
Search
Configure Global Search
Log In
Files
F15456998
D9173.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Award Token
Flag For Later
Size
762 B
Referenced Files
None
Subscribers
None
D9173.diff
View Options
diff --git a/src/lint/linter/ArcanistJSHintLinter.php b/src/lint/linter/ArcanistJSHintLinter.php
--- a/src/lint/linter/ArcanistJSHintLinter.php
+++ b/src/lint/linter/ArcanistJSHintLinter.php
@@ -49,11 +49,14 @@
}
public function getVersion() {
- list($stdout) = execx('%C --version', $this->getExecutableCommand());
+ // NOTE: `jshint --version` emits version information on stderr, not stdout.
+ list($stdout, $stderr) = execx(
+ '%C --version',
+ $this->getExecutableCommand());
$matches = array();
$regex = '/^jshint v(?P<version>\d+\.\d+\.\d+)$/';
- if (preg_match($regex, $stdout, $matches)) {
+ if (preg_match($regex, $stderr, $matches)) {
return $matches['version'];
} else {
return false;
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Mon, Mar 31, 1:34 PM (3 w, 2 d ago)
Storage Engine
blob
Storage Format
Encrypted (AES-256-CBC)
Storage Handle
7719948
Default Alt Text
D9173.diff (762 B)
Attached To
Mode
D9173: Fix the `ArcanistJSHintLinter::getVersion` function.
Attached
Detach File
Event Timeline
Log In to Comment