diff options
Diffstat (limited to 'python/servo/build_commands.py')
-rw-r--r-- | python/servo/build_commands.py | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/python/servo/build_commands.py b/python/servo/build_commands.py index 3b87e9aba7e..c3a0819ac00 100644 --- a/python/servo/build_commands.py +++ b/python/servo/build_commands.py @@ -320,7 +320,10 @@ class MachCommands(CommandBase): exitcode = process.wait() encoding = locale.getpreferredencoding() # See https://stackoverflow.com/a/9228117 if exitcode == 0: - os.environ.update(eval(stdout.decode(encoding))) + decoded = stdout.decode(encoding) + if decoded.startswith("environ("): + decoded = decoded.strip()[8:-1] + os.environ.update(eval(decoded)) else: print("Failed to run vcvarsall. stderr:") print(stderr.decode(encoding)) |