From 53dc751981f26343ace52360e88a140014fa5704 Mon Sep 17 00:00:00 2001 From: Jonathan Rainville Date: Thu, 5 Mar 2020 15:17:06 -0500 Subject: [PATCH] fix(@embark/ganache): make embark blockchain exit when using Ganache --- packages/plugins/ganache/src/index.js | 2 +- packages/stack/blockchain/src/index.js | 4 ++-- packages/stack/proxy/src/index.ts | 1 - 3 files changed, 3 insertions(+), 4 deletions(-) diff --git a/packages/plugins/ganache/src/index.js b/packages/plugins/ganache/src/index.js index 921ae4fb7..f70803452 100644 --- a/packages/plugins/ganache/src/index.js +++ b/packages/plugins/ganache/src/index.js @@ -20,7 +20,7 @@ class Ganache { this._registerStatusCheck(); this._getProvider(); // No need to return anything, we just want to populate currentProvider this.embark.logger.info(__('Blockchain node is ready').cyan); - cb(); + cb(null, true); }, stopFn: (cb) => { this.currentProvider = null; diff --git a/packages/stack/blockchain/src/index.js b/packages/stack/blockchain/src/index.js index 8114c540a..bb2fb2143 100644 --- a/packages/stack/blockchain/src/index.js +++ b/packages/stack/blockchain/src/index.js @@ -78,9 +78,9 @@ export default class Blockchain { return cb(null, true); } // start node - client.launchFn.call(client, () => { + client.launchFn.call(client, (_err, isVM) => { started(); - cb(); + cb(null, isVM); }); }); }); diff --git a/packages/stack/proxy/src/index.ts b/packages/stack/proxy/src/index.ts index 7a059c12c..dcec19d56 100644 --- a/packages/stack/proxy/src/index.ts +++ b/packages/stack/proxy/src/index.ts @@ -130,7 +130,6 @@ export default class ProxyManager { // HTTP this.httpProxy = await new Proxy({ - endpoint, events: this.events, isWs: false, logger: this.logger,