make sure we are in a Dapp

This commit is contained in:
Jonathan Rainville 2018-09-07 12:40:25 -04:00
parent 5c973258a5
commit fb7b98c055
1 changed files with 4 additions and 2 deletions

View File

@ -17,17 +17,19 @@ function launchEmbark() {
}
const path = require('path');
require('colors');
try {
const dappPackage = require(path.join(process.cwd(), 'package.json'));
require(path.join(process.cwd(), 'embark.json')); // Make sure we are in a Dapp
require('check-dependencies')(dappPackage, (state) => {
if (state.status) {
require('colors');
console.error('\nMissing dependencies. Please run npm install'.red);
process.exit();
}
launchEmbark();
});
} catch (e) {
} catch (_e) {
// We are not in a Dapp
launchEmbark();
}