Bug 1382140 - Cannot use the lint commit hooks on Windows. r=ahal draft
authorMarco Bonardo <mbonardo@mozilla.com>
Mon, 24 Jul 2017 10:06:33 +0200
changeset 614227 48bd0ca53e8c6e844ecbb981d2555a2804d548d1
parent 614015 5928d905c0bc0b28f5488b236444c7d7991cf8d4
child 638815 247f0bf0e53752fbdab2160afb5dbc807bb8be70
push id69957
push usermak77@bonardo.net
push dateMon, 24 Jul 2017 09:32:34 +0000
reviewersahal
bugs1382140
milestone56.0a1
Bug 1382140 - Cannot use the lint commit hooks on Windows. r=ahal MozReview-Commit-ID: A5jLDooHosK
tools/lint/hooks.py
--- 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)