Commit 324dd16
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 <[email protected]>
Commit-Queue: Mark Mentovai <[email protected]>1 parent 4801a53 commit 324dd16
1 file changed
Lines changed: 13 additions & 3 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
306 | 306 | | |
307 | 307 | | |
308 | 308 | | |
309 | | - | |
| 309 | + | |
| 310 | + | |
| 311 | + | |
| 312 | + | |
| 313 | + | |
310 | 314 | | |
311 | | - | |
| 315 | + | |
| 316 | + | |
| 317 | + | |
| 318 | + | |
| 319 | + | |
| 320 | + | |
| 321 | + | |
312 | 322 | | |
313 | 323 | | |
314 | 324 | | |
| |||
2721 | 2731 | | |
2722 | 2732 | | |
2723 | 2733 | | |
2724 | | - | |
| 2734 | + | |
2725 | 2735 | | |
2726 | 2736 | | |
2727 | 2737 | | |
| |||
0 commit comments