py3: remove forced decoding of environment variable

Summary:
On python 2, os.environ is expected to be bytes, so let's remove the
forced decoding. This broke run-tests.py on Windows.

Reviewed By: singhsrb

Differential Revision: D19737218

fbshipit-source-id: d4782eea279275f57cc91bc412a2d74857002cc1
This commit is contained in:
Durham Goode 2020-02-04 17:29:56 -08:00 committed by Facebook Github Bot
parent 825d70f702
commit d3227d34c2

View File

@ -635,7 +635,7 @@ def parseargs(args, parser):
if options.with_hg:
options.with_hg = canonpath(_bytespath(options.with_hg))
# HGEXECUTABLEPATH is used by util.hgcmd()
os.environ["HGEXECUTABLEPATH"] = options.with_hg.decode("utf-8")
os.environ["HGEXECUTABLEPATH"] = _strpath(options.with_hg)
if not (
os.path.isfile(options.with_hg) and os.access(options.with_hg, os.X_OK)
):