Bug 1382140 - Cannot use the lint commit hooks on Windows. r=ahal
MozReview-Commit-ID: A5jLDooHosK
--- a/tools/lint/hooks.py
+++ b/tools/lint/hooks.py
@@ -8,17 +8,17 @@ import subprocess
import sys
here = os.path.dirname(os.path.realpath(__file__))
topsrcdir = os.path.join(here, os.pardir, os.pardir)
def run_mozlint(hooktype, args):
# --quiet prevents warnings on eslint, it will be ignored by other linters
- cmd = [os.path.join(topsrcdir, 'mach'), 'lint', '--quiet']
+ cmd = [sys.executable, os.path.join(topsrcdir, 'mach'), 'lint', '--quiet']
if 'commit' in hooktype:
# don't prevent commits, just display the lint results
subprocess.call(cmd + ['--workdir=staged'])
return False
elif 'push' in hooktype:
return subprocess.call(cmd + ['--outgoing'] + args)