make sure we are in a Dapp
This commit is contained in:
parent
5c973258a5
commit
fb7b98c055
|
@ -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();
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue