From fb7b98c0553b04313c19464be08f67c6c7461c16 Mon Sep 17 00:00:00 2001 From: Jonathan Rainville Date: Fri, 7 Sep 2018 12:40:25 -0400 Subject: [PATCH] make sure we are in a Dapp --- bin/embark | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/bin/embark b/bin/embark index 884ba91d..19916959 100755 --- a/bin/embark +++ b/bin/embark @@ -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(); }