From 7f4ad7117a0fd23988744a95404593eeb01cae52 Mon Sep 17 00:00:00 2001 From: Aurelijus Date: Mon, 30 Jul 2012 09:21:03 +0200 Subject: [PATCH] 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 --- src/lint/linter/ArcanistJSHintLinter.php | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) 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 ". -- 2.43.0