From 53585cba5083280c1275fe774b08948d079608ff Mon Sep 17 00:00:00 2001 From: Anthony Laibe Date: Tue, 7 Aug 2018 16:37:46 +0100 Subject: [PATCH] Fix connection to IPC - Make sure the folder .embark exist otherwise the first time there is a run, the connection abort - Fix the number of args in the callback function --- lib/core/ipc.js | 5 +++-- lib/tests/test.js | 4 ++-- 2 files changed, 5 insertions(+), 4 deletions(-) diff --git a/lib/core/ipc.js b/lib/core/ipc.js index e84e88abc..de028afa7 100644 --- a/lib/core/ipc.js +++ b/lib/core/ipc.js @@ -38,6 +38,7 @@ class IPC { } serve() { + fs.mkdirpSync(fs.dappPath(".embark")); ipc.serve(this.socketPath, () => {}); ipc.server.start(); @@ -50,7 +51,7 @@ class IPC { if (data.action !== action) { return; } - let reply = function(replyData) { + let reply = function(_err, replyData) { self.reply(socket, 'compile', replyData); }; done(data.message, reply, socket); @@ -66,7 +67,7 @@ class IPC { if (msg.action !== action) { return; } - cb(msg.message); + cb(null, msg.message); }); } diff --git a/lib/tests/test.js b/lib/tests/test.js index ee1fb5216..47cfb7c7c 100644 --- a/lib/tests/test.js +++ b/lib/tests/test.js @@ -119,8 +119,8 @@ class Test { web3: this.web3 }); this.engine.startService("deployment", { - trackContracts: false - //ipcRole: 'client' // disabled for now due to issues with ipc file + trackContracts: false, + ipcRole: 'client' }); this.events.request('deploy:setGasLimit', 6000000); }