From: Aurelijus Date: Mon, 30 Jul 2012 07:21:03 +0000 (+0200) Subject: JSHint linter issue on windows X-Git-Tag: conduit-6~182^2 X-Git-Url: http://git.khamidou.com/?a=commitdiff_plain;h=7f4ad7117a0fd23988744a95404593eeb01cae52;p=arcanist.git JSHint linter issue on windows Summary: On windows there is no 'which', only 'where' Test Plan: Run JSHint linter on windows and unix-like system. Reviewers: epriestley CC: aran, Korvin Differential Revision: https://secure.phabricator.com/D3096 --- diff --git a/src/lint/linter/ArcanistJSHintLinter.php b/src/lint/linter/ArcanistJSHintLinter.php index 6d25a4dd..06f0fa1c 100644 --- a/src/lint/linter/ArcanistJSHintLinter.php +++ b/src/lint/linter/ArcanistJSHintLinter.php @@ -116,7 +116,8 @@ final class ArcanistJSHintLinter extends ArcanistLinter { } // Look for globally installed JSHint - list($err) = exec_manual('which %s', $bin); + $cmd = (phutil_is_windows()) ? 'where %s' : 'which %s'; + list($err) = exec_manual($cmd, $bin); if ($err) { throw new ArcanistUsageException( "JSHint does not appear to be installed on this system. Install it ".