Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
gyp: show descriptive Windows SDK detection error
When building with Visual Studio 2017, gyp may fail with a non-descriptive message if Windows has stale registry keys for a version of Windows SDK that was previously uninstalled. This commit adds a specific warning message when the directory for a detected SDK version doesn't exist and adds some Fixes to avoid Python crashes that were blocking the detection of other SDK versions: - Only try to run listdir on a path if it exists and is a dir. - Avoid accessing names[0] if it has no elements. - Use %s instead of %o to print compatible_sdks (to avoid TypeError, since %o is the octal number format specifier in Python and %s can be used as a generic format specifier for objects). Refs: nodejs/node#14597 Bug: nodejs/node#14103 Change-Id: Ifd50fe239f65b7b4a2d69c1c02038bada03066cb Reviewed-on: https://chromium-review.googlesource.com/602133 Reviewed-by: Mark Mentovai <mark@chromium.org> Commit-Queue: Mark Mentovai <mark@chromium.org>
- Loading branch information