mirror of
https://github.com/electron/node-gyp.git
synced 2025-08-15 12:58:19 +02:00
lib: ignore VS instances that cause COMExceptions
I have quite a few instances of VS installed and it looks like Find-VisualStudio.cs enumerates all of them, even when find-visualstudio.js already knows which one it wants (from the environment variable in the developer command prompt). One of them (from 15.7.2, if that's interesting) causes a COMException on the ISetupInstance2.GetPackages call. Ignoring such packages seems harmless and unblocks the rest of the run. PR-URL: https://github.com/nodejs/node-gyp/pull/2018 Reviewed-By: João Reis <reis@janeasystems.com>
This commit is contained in:
parent
a79d866ac3
commit
1f7e1e93b5
1 changed files with 8 additions and 1 deletions
|
@ -205,8 +205,15 @@ namespace VisualStudioConfiguration
|
|||
return;
|
||||
}
|
||||
|
||||
try
|
||||
{
|
||||
instances.Add(InstanceJson(rgelt[0]));
|
||||
}
|
||||
catch (COMException)
|
||||
{
|
||||
// Ignore instances that can't be queried.
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
private static string JsonString(string s)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue