Fallback to VC registry detection
This commit is contained in:
@@ -596,23 +596,24 @@ module.exports.getMissingDependencies = dependencies => {
|
||||
};
|
||||
|
||||
const Registry = require('winreg');
|
||||
const checkRegistry = (dep, index, legacyRuntimeDetection) => {
|
||||
const checkRegistry = (dep, index) => {
|
||||
if (index >= dep.registry.length) {
|
||||
missing.push(dep);
|
||||
resolveIfComplete();
|
||||
} else {
|
||||
if (!legacyRuntimeDetection && (dep.display === 'VC Runtime 2015-2019')) {
|
||||
if (dep.display === 'VC Runtime 2015-2019') {
|
||||
_vcRuntimeExists()
|
||||
.then(exists => {
|
||||
if (exists) {
|
||||
resolveIfComplete();
|
||||
} else {
|
||||
checkRegistry(dep, 0, true);
|
||||
if (!exists) {
|
||||
missing.push(dep);
|
||||
}
|
||||
resolveIfComplete();
|
||||
})
|
||||
.catch (() => {
|
||||
checkRegistry(dep, 0, true);
|
||||
.catch(() => {
|
||||
missing.push(dep);
|
||||
resolveIfComplete();
|
||||
})
|
||||
} else {
|
||||
missing.push(dep);
|
||||
resolveIfComplete();
|
||||
}
|
||||
} else {
|
||||
let hive = null;
|
||||
const hiveName = dep.registry[index].split('\\')[0];
|
||||
@@ -655,7 +656,6 @@ module.exports.getMissingDependencies = dependencies => {
|
||||
}
|
||||
});
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
for (const dependency of dependencies) {
|
||||
|
||||
Reference in New Issue
Block a user