diff --git a/lib/cmds/blockchain/blockchain.js b/lib/cmds/blockchain/blockchain.js index 7ca0608e..37558fa3 100644 --- a/lib/cmds/blockchain/blockchain.js +++ b/lib/cmds/blockchain/blockchain.js @@ -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);