DescriptionError checking to clarify SYSTEMROOT errors
Occasionally developers hit this cryptic error:
Exception: Environment variable "SYSTEMROOT" required to be set to valid path
The error message is well intentioned but inevitably misleading. The problem is
rarely if ever caused by SYSTEMROOT not being set. In the most recent case it
was caused by the "SetEnv.cmd && set" command failing.
This change adds two bits of error checking - checking the error code of the
Popen command, and ensuring that the results coming in to
_ExtractImportantEnvironment are plausible. Both of these checks can detect this
particular error, and one or both of them should detect future problems.
This was initially done for gyp in crrev.com/1501673004, this makes the same fix
for gn builds.
R=jam@chromium.org
Committed: https://crrev.com/5e289be0b06d4781610d16daec9064f6f811ce18
Cr-Commit-Position: refs/heads/master@{#363930}
Patch Set 1 #
Messages
Total messages: 13 (6 generated)
|