Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

node-gyp@5.1.0 Release Proposal #2012

Closed
wants to merge 16 commits into from
Closed
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
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: #2018
Reviewed-By: João Reis <reis@janeasystems.com>
  • Loading branch information
amcasey authored and rvagg committed Feb 3, 2020
commit 278dcddbddee25761d7a010b3b5e9f10e21af707
9 changes: 8 additions & 1 deletion lib/Find-VisualStudio.cs
Original file line number Diff line number Diff line change
Expand Up @@ -205,7 +205,14 @@ public static void PrintJson()
return;
}

instances.Add(InstanceJson(rgelt[0]));
try
{
instances.Add(InstanceJson(rgelt[0]));
}
catch (COMException)
{
// Ignore instances that can't be queried.
}
}
}

Expand Down