Bug 1585702 - [lint] Remove temporary hacks now that 'null character' issue is fixed, r=gbrown
authorAndrew Halberstadt <ahalberstadt@mozilla.com>
Fri, 04 Oct 2019 19:13:04 +0000
changeset 496394 e4085fae0f8b77dcfdec85d52d518624f8b6593d
parent 496393 9ea7f7d1768681d657daf36134d7a7d681b2e879
child 496395 23839eda99ddf769769fefe89a12bb35ede464fb
push id97217
push userahalberstadt@mozilla.com
push dateFri, 04 Oct 2019 19:41:48 +0000
treeherderautoland@e4085fae0f8b [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersgbrown
bugs1585702
milestone71.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 1585702 - [lint] Remove temporary hacks now that 'null character' issue is fixed, r=gbrown Depends on D48113 Differential Revision: https://phabricator.services.mozilla.com/D48209
tools/lint/eslint/__init__.py
tools/lint/wpt/wpt.py
--- a/tools/lint/eslint/__init__.py
+++ b/tools/lint/eslint/__init__.py
@@ -85,25 +85,16 @@ def lint(paths, config, binary=None, 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, universal_newlines=True)
-
-    if sys.platform == 'win32':
-        # Workaround for bug 1585702. According to the win32 docs,
-        # CreateProcess will use the calling process's env by default. Since we
-        # are passing in `os.environ` wholesale anyway, setting the env to
-        # `None` shouldn't make a difference. An alternative workaround would
-        # be to stop using mozprocess here and use subprocess directly.
-        proc.env = None
-
     proc.run()
     signal.signal(signal.SIGINT, orig)
 
     try:
         proc.wait()
     except KeyboardInterrupt:
         proc.kill()
         return []
--- a/tools/lint/wpt/wpt.py
+++ b/tools/lint/wpt/wpt.py
@@ -34,25 +34,16 @@ def lint(files, config, **kwargs):
         print("No specific files specified, running the full wpt lint"
               " (this is slow)", file=sys.stderr)
         files = ["--all"]
     cmd = ['python2', os.path.join(tests_dir, 'wpt'), 'lint', '--json'] + files
     log.debug("Command: {}".format(' '.join(cmd)))
 
     proc = ProcessHandler(cmd, env=os.environ, processOutputLine=process_line,
                           universal_newlines=True)
-
-    if sys.platform == 'win32':
-        # Workaround for bug 1585702. According to the win32 docs,
-        # CreateProcess will use the calling process's env by default. Since we
-        # are passing in `os.environ` wholesale anyway, setting the env to
-        # `None` shouldn't make a difference. An alternative workaround would
-        # be to stop using mozprocess here and use subprocess directly.
-        proc.env = None
-
     proc.run()
     try:
         proc.wait()
         if proc.returncode != 0:
             results.append(
                 result.from_config(config,
                                    message="Lint process exited with return code %s" %
                                    proc.returncode))