Merge pull request #1018 from embark-framework/bug_fix/shim-main-returns

fix the shim
This commit is contained in:
Michael Bradley 2018-10-31 18:28:10 +01:00 committed by GitHub
commit 662e2488fb
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 4 additions and 8 deletions

View File

@ -15,7 +15,7 @@
// package.json under `{"embark": {...}}` -or- stored in an embark.json file. // package.json under `{"embark": {...}}` -or- stored in an embark.json file.
function main() { function main() {
whenNoShim(); if (whenNoShim()) return;
var invoked = thisEmbark(); var invoked = thisEmbark();
var embarkJson = findEmbarkJson(); var embarkJson = findEmbarkJson();
var dappPath = embarkJson.dirname; var dappPath = embarkJson.dirname;
@ -725,13 +725,9 @@ function thisEmbark() {
} }
function whenNoShim() { function whenNoShim() {
var noShim = false; var noShim = !!process.env.EMBARK_NO_SHIM;
if (process.env.EMBARK_NO_SHIM) { if (noShim) EmbarkBin.prototype.exec();
noShim = true; return noShim;
}
if (noShim) {
EmbarkBin.prototype.exec();
}
} }
// -- reporters ---------------------------------------------------------------- // -- reporters ----------------------------------------------------------------