From f3ba725efc28609c341c05bd16603ad193f76bfb Mon Sep 17 00:00:00 2001 From: "Michael Bradley, Jr" Date: Wed, 31 Oct 2018 18:01:44 +0100 Subject: [PATCH] when whenNoShim runs noShim if-branch main should return immediately --- bin/embark | 12 ++++-------- 1 file changed, 4 insertions(+), 8 deletions(-) diff --git a/bin/embark b/bin/embark index f0e9e05a5..d2100c521 100755 --- a/bin/embark +++ b/bin/embark @@ -15,7 +15,7 @@ // package.json under `{"embark": {...}}` -or- stored in an embark.json file. function main() { - whenNoShim(); + if (whenNoShim()) return; var invoked = thisEmbark(); var embarkJson = findEmbarkJson(); var dappPath = embarkJson.dirname; @@ -725,13 +725,9 @@ function thisEmbark() { } function whenNoShim() { - var noShim = false; - if (process.env.EMBARK_NO_SHIM) { - noShim = true; - } - if (noShim) { - EmbarkBin.prototype.exec(); - } + var noShim = !!process.env.EMBARK_NO_SHIM; + if (noShim) EmbarkBin.prototype.exec(); + return noShim; } // -- reporters ----------------------------------------------------------------