Skip to content

Fix visual c++ detection via vswhere #171

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

Closed
Closed
Changes from all commits
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
8 changes: 3 additions & 5 deletions lib/es6/vsDetect.js
Original file line number Diff line number Diff line change
Expand Up @@ -15,18 +15,16 @@ let vsDetect = {
return vsInstalled || vsvNextInstalled || buildToolsInstalled || foundByVSWhere;
}),
_isFoundByVSWhere: async(function* (version) {
// TODO: with auto download
/*
let mainVer = version.split(".")[0];
let command = path.resolve("vswhere.exe");
let basePath = _.get(process.env, "ProgramFiles(x86)", _.get(process.env, "ProgramFiles"));
let command = path.resolve(basePath, "Microsoft Visual Studio", "Installer", "vswhere.exe");
try {
let stdout = yield processHelpers.exec(command, ["-version", version]);
let stdout = yield processHelpers.exec(`"${command}" -products * -requires Microsoft.VisualStudio.Component.VC.Tools.x86.x64`);
return stdout && stdout.indexOf("installationVersion: " + mainVer) > 0;
}
catch (e) {
_.noop(e);
}
*/
return false;
}),
_isBuildToolsInstalled: async(function*(version) {
Expand Down