Bug 1496080 - Fix ./mach eslint --fix. r=ahal
authorMark Banner <standard8@mozilla.com>
Wed, 03 Oct 2018 14:44:19 +0000
changeset 495142 c5b037dfba7e9863efea887e6e9bb970ce3102e3
parent 495141 9ebf0b05b44abcdfeebf98ffcc6db352261d9f5e
child 495143 328a8076c760f5d152b2fdf4607530e32fc09349
push id9984
push userffxbld-merge
push dateMon, 15 Oct 2018 21:07:35 +0000
treeherdermozilla-beta@183d27ea8570 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersahal
bugs1496080
milestone64.0a1
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
Bug 1496080 - Fix ./mach eslint --fix. r=ahal Insert the argument in the correct place when passing to node. Differential Revision: https://phabricator.services.mozilla.com/D7609
tools/lint/eslint/__init__.py
--- a/tools/lint/eslint/__init__.py
+++ b/tools/lint/eslint/__init__.py
@@ -69,17 +69,17 @@ def lint(paths, config, binary=None, fix
                 '--plugin', 'html',
                 # This keeps ext as a single argument.
                 '--ext', '[{}]'.format(','.join(config['extensions'])),
                 '--format', 'json',
                 ] + extra_args + paths
 
     # eslint requires that --fix be set before the --ext argument.
     if fix:
-        cmd_args.insert(1, '--fix')
+        cmd_args.insert(2, '--fix')
 
     shell = False
     if os.environ.get('MSYSTEM') in ('MINGW32', 'MINGW64'):
         # The eslint binary needs to be run from a shell with msys
         shell = True
 
     orig = signal.signal(signal.SIGINT, signal.SIG_IGN)
     proc = ProcessHandler(cmd_args, env=os.environ, stream=None, shell=shell)