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');
|
const path = require('path');
|
||||||
require('colors');
|
|
||||||
try {
|
try {
|
||||||
const dappPackage = require(path.join(process.cwd(), 'package.json'));
|
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) => {
|
require('check-dependencies')(dappPackage, (state) => {
|
||||||
if (state.status) {
|
if (state.status) {
|
||||||
|
require('colors');
|
||||||
console.error('\nMissing dependencies. Please run npm install'.red);
|
console.error('\nMissing dependencies. Please run npm install'.red);
|
||||||
process.exit();
|
process.exit();
|
||||||
}
|
}
|
||||||
launchEmbark();
|
launchEmbark();
|
||||||
});
|
});
|
||||||
} catch (e) {
|
} catch (_e) {
|
||||||
|
// We are not in a Dapp
|
||||||
launchEmbark();
|
launchEmbark();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue