use right path depending of os
This commit is contained in:
parent
b6a6bf3e02
commit
e9b4179af9
|
@ -197,10 +197,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