From 371ba67d55408237ca79c8b9a8d1a5072a2d028f Mon Sep 17 00:00:00 2001 From: Manish Goregaokar Date: Wed, 15 Apr 2020 22:55:05 -0700 Subject: Report error when vcvarsall fails --- python/servo/build_commands.py | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'python/servo/build_commands.py') 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: -- cgit v1.2.3