use .embark instead of /tmp

This commit is contained in:
Iuri Matias 2018-06-04 13:26:25 -04:00
parent b16c06025b
commit e96842f9da

View File

@ -4,7 +4,6 @@ let currentSolcVersion = require('../../../package.json').dependencies.solc;
const ProcessLauncher = require('../../process/processLauncher'); const ProcessLauncher = require('../../process/processLauncher');
const uuid = require('uuid/v1'); const uuid = require('uuid/v1');
let ipc = require('node-ipc') let ipc = require('node-ipc')
let socketPath = "/tmp/embark.sock"
class SolcW { class SolcW {
@ -30,7 +29,7 @@ class SolcW {
}); });
} }
ipc.connectTo('embark', socketPath, connecting); ipc.connectTo('embark', fs.dappPath(".embark/embark.ipc"), connecting);
return; return;
} }
@ -62,9 +61,9 @@ class SolcW {
); );
} }
ipc.serve(socketPath, _connecting) ipc.serve(fs.dappPath(".embark/embark.ipc"), _connecting)
ipc.server.start() ipc.server.start()
this.logger.info(`pid ${process.pid} listening on ${socketPath}`); this.logger.info(`pid ${process.pid} listening on ${fs.dappPath(".embark/embark.ipc")}`);
this.events.request("version:get:solc", function(solcVersion) { this.events.request("version:get:solc", function(solcVersion) {
if (solcVersion === currentSolcVersion) { if (solcVersion === currentSolcVersion) {
@ -88,7 +87,6 @@ class SolcW {
compile(jsonObj, done) { compile(jsonObj, done) {
const id = uuid(); const id = uuid();
let a = new Date(); let a = new Date();
console.dir("doing compile");
if (this.useIpc) { if (this.useIpc) {
ipc.of['embark'].once('message', function(msg) { ipc.of['embark'].once('message', function(msg) {