diff --git a/python/servo/build_commands.py b/python/servo/build_commands.py index cb54497377a..88b3e976f34 100644 --- a/python/servo/build_commands.py +++ b/python/servo/build_commands.py @@ -315,11 +315,15 @@ class MachCommands(CommandBase): process = subprocess.Popen('("%s" %s > nul) && "python" -c "import os; print(repr(os.environ))"' % (os.path.join(vs_dirs['vcdir'], "Auxiliary", "Build", "vcvarsall.bat"), "x64"), stdout=subprocess.PIPE, shell=True) - stdout, _ = process.communicate() + stdout, stderr = process.communicate() exitcode = process.wait() encoding = locale.getpreferredencoding() # See https://stackoverflow.com/a/9228117 if exitcode == 0: os.environ.update(eval(stdout.decode(encoding))) + else: + print("Failed to run vcvarsall. stderr:") + print(stderr.decode(encoding)) + exit(1) # Ensure that GStreamer libraries are accessible when linking. if 'windows' in target_triple: