change ipfs to spawn too
This commit is contained in:
parent
6fa472ae11
commit
3c32f98f71
|
@ -6,7 +6,7 @@ const fs = require('../../core/fs.js');
|
|||
|
||||
const GethCommands = require('./geth_commands.js');
|
||||
|
||||
/*eslint complexity: ["error", 35]*/
|
||||
/*eslint complexity: ["error", 36]*/
|
||||
var Blockchain = function(options) {
|
||||
this.blockchainConfig = options.blockchainConfig;
|
||||
this.env = options.env || 'development';
|
||||
|
|
|
@ -139,5 +139,8 @@
|
|||
"For more info go to http://embark.status.im": "For more info go to http://embark.status.im",
|
||||
"%s is not installed on your machine": "%s is not installed on your machine",
|
||||
"You can install it by visiting: %s": "You can install it by visiting: %s",
|
||||
"IPFS node is offline": "IPFS node is offline"
|
||||
"IPFS node is offline": "IPFS node is offline",
|
||||
"Starting ipfs process": "Starting ipfs process",
|
||||
"ipfs process started": "ipfs process started",
|
||||
"IPFS node detected": "IPFS node detected"
|
||||
}
|
|
@ -1,4 +1,4 @@
|
|||
const shelljs = require('shelljs');
|
||||
const child_process = require('child_process');
|
||||
const ProcessWrapper = require('../../process/processWrapper');
|
||||
const constants = require('../../constants');
|
||||
|
||||
|
@ -13,7 +13,7 @@ class IPFSProcess extends ProcessWrapper {
|
|||
}
|
||||
|
||||
checkIPFSVersion() {
|
||||
shelljs.exec('ipfs --version', {silent: true}, (err, stdout, _stderr) => {
|
||||
child_process.exec('ipfs --version', {silent: true}, (err, stdout, _stderr) => {
|
||||
if (err) {
|
||||
console.error(err);
|
||||
return;
|
||||
|
@ -31,13 +31,7 @@ class IPFSProcess extends ProcessWrapper {
|
|||
|
||||
startIPFSDaemon() {
|
||||
const self = this;
|
||||
const child = shelljs.exec('ipfs daemon', {silent: true}, (err, _stdout, _stderr) => {
|
||||
if (err) {
|
||||
console.error(err);
|
||||
process.exit(1);
|
||||
}
|
||||
process.exit();
|
||||
});
|
||||
const child = child_process.spawn('ipfs', ['daemon']);
|
||||
let lastMessage;
|
||||
child.stdout.on('data', (data) => {
|
||||
if (!self.readyCalled && data.indexOf('Daemon is ready') > -1) {
|
||||
|
|
Loading…
Reference in New Issue