use right path depending of os
This commit is contained in:
parent
f49e79d4e2
commit
1970f8fc53
|
@ -214,10 +214,17 @@ Blockchain.prototype.readyCallback = function() {
|
|||
}
|
||||
|
||||
const NetcatClient = require('netcat/client');
|
||||
const isWin = process.platform === "win32";
|
||||
|
||||
let ipcPath;
|
||||
if (isWin) {
|
||||
ipcPath = '\\\\.\\pipe\\geth.ipc';
|
||||
} else {
|
||||
ipcPath = self.datadir + '/geth.ipc';
|
||||
}
|
||||
|
||||
var nc2 = new NetcatClient();
|
||||
nc2.unixSocket('/home/jonathan/dapp-bin/embark_demo/.embark/development/datadir/geth.ipc')
|
||||
const nc2 = new NetcatClient();
|
||||
nc2.unixSocket(ipcPath)
|
||||
.enc('utf8')
|
||||
.on('data', function(res){
|
||||
console.log(res);
|
||||
|
|
Loading…
Reference in New Issue