Skip to content

Commit

Permalink
fix: Update validator logic to not need drivelist dependency
Browse files Browse the repository at this point in the history
- drivelist is only Baker dependency which needs VS to build
  • Loading branch information
ssmirr committed Dec 21, 2018
1 parent 54e4d24 commit 8af6f89
Showing 1 changed file with 6 additions and 20 deletions.
26 changes: 6 additions & 20 deletions lib/modules/validator.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
const Promise = require('bluebird');
const drivelist = Promise.promisifyAll(require('drivelist'));
const fs = require('fs-extra');
const hasbin = require('hasbin');
const path = require('path');
Expand Down Expand Up @@ -28,25 +26,13 @@ class Validator {
else {
hasbin('vagrant', async function (hasVagrant) {
if(hasVagrant){
let drives = (await drivelist.listAsync()).map(d => d.mountpoints[0].path);
drives.forEach(drive => {
fs.access(path.resolve(path.join(drive, `/Program Files/Oracle/VirtualBox`)), err => {
if (err){
fs.access(path.resolve(path.join(drive, `/Program Files (x86)/Oracle/VirtualBox`)), err => {
if(err) {
fs.access(path.resolve(path.join(process.env.PROGRAMFILES, `/Oracle/VirtualBox`)), err => {
if(err){
// throw dependencyNotFound;
print.warning(dependencyNotFound, 1)
return true;
}
});
}
});
}
fs.access(path.resolve(path.join(process.env.PROGRAMFILES, `/Oracle/VirtualBox`)), err => {
if (err) {
// throw dependencyNotFound;
print.warning(dependencyNotFound, 1);
return true;
});
})
}
});
} else {
// throw dependencyNotFound;
print.warning(dependencyNotFound, 1)
Expand Down

0 comments on commit 8af6f89

Please sign in to comment.