conflict in en.json

This commit is contained in:
Jonathan Rainville 2018-05-28 11:51:38 -04:00
parent bc853ef899
commit e67fafdc29
5 changed files with 45 additions and 13 deletions

View File

@ -125,7 +125,7 @@ Blockchain.prototype.run = function() {
});
child.on('exit', (code) => {
if (code) {
console.error('Geth exited with error code ' + 1);
console.error('Geth exited with error code ' + code);
console.error(lastMessage);
}
});

View File

@ -135,6 +135,8 @@
"deploying to swarm!": "deploying to swarm!",
"adding %s to swarm": "adding %s to swarm",
"error uploading to swarm": "error uploading to swarm",
"Starting ipfs process": "Starting ipfs process",
"Storage process for ipfs ended before the end of this process. Code: 0": "Storage process for ipfs ended before the end of this process. Code: 0",
"WARNING! DApp path length is too long: ": "WARNING! DApp path length is too long: ",
"This is known to cause issues with starting geth, please consider reducing your DApp path's length to 66 characters or less.": "This is known to cause issues with starting geth, please consider reducing your DApp path's length to 66 characters or less.",
"Installing packages...": "Installing packages...",
@ -143,4 +145,4 @@
"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"
}
}

View File

@ -335,8 +335,19 @@ class Embark {
if (!checkFn || typeof checkFn.fn !== 'function') {
return callback();
}
checkFn.fn(function (serviceCheckResult) {
if (!serviceCheckResult.status || serviceCheckResult.status === 'off') {
const erroObj = {message: __('Cannot upload: {{platform}} node is not running on {{protocol}}://{{host}}:{{port}}.', {platform: platform, protocol: engine.config.storageConfig.protocol, host: engine.config.storageConfig.host, port: engine.config.storageConfig.port})};
function checkEndpoint(cb) {
checkFn.fn(function (serviceCheckResult) {
if (!serviceCheckResult.status || serviceCheckResult.status === 'off') {
return cb(erroObj);
}
cb();
});
}
checkEndpoint(function (err) {
if (err) {
const storageProcessesLauncher = new StorageProcessesLauncher({
logger: engine.logger,
events: engine.events,
@ -345,9 +356,15 @@ class Embark {
return storageProcessesLauncher.launchProcess(platform.toLowerCase(), (err) => {
if (err) {
engine.logger.error(err);
return callback({message: __('Cannot upload: {{platform}} node is not running on {{protocol}}://{{host}}:{{port}}.', {platform: platform, protocol: engine.config.storageConfig.protocol, host: engine.config.storageConfig.host, port: engine.config.storageConfig.port})});
return callback(erroObj);
}
callback();
// Check endpoint again to see if really did start
checkEndpoint((err) => {
if (err) {
return callback(err);
}
callback();
});
});
}
callback();

View File

@ -2,7 +2,7 @@ const shelljs = require('shelljs');
const ProcessWrapper = require('../../process/processWrapper');
const constants = require('../../constants');
let ipfsProcess;
let ipfsProcess; // eslint-disable-line no-unused-vars
class IPFSProcess extends ProcessWrapper {
constructor(_options) {
@ -12,19 +12,34 @@ class IPFSProcess extends ProcessWrapper {
}
startIPFSDaemon() {
shelljs.exec('ipfs daemon', {silent: true}, (err, _stdout, _stderr) => {
const self = this;
const child = shelljs.exec('ipfs daemon', {silent: true}, (err, _stdout, _stderr) => {
if (err) {
console.error(err);
process.exit(1);
}
process.exit();
});
let lastMessage;
child.stdout.on('data', (data) => {
if (!self.readyCalled && data.indexOf('Daemon is ready') > -1) {
self.readyCalled = true;
self.send({result: constants.storage.initiated});
}
lastMessage = data;
console.log('IPFS: ' + data);
});
child.on('exit', (code) => {
if (code) {
console.error('IPFS exited with error code ' + code);
console.error(lastMessage);
}
});
}
}
process.on('message', (msg) => {
if (msg.action === constants.storage.init) {
ipfsProcess = new IPFSProcess(msg.options);
return ipfsProcess.send({result: constants.storage.initiated});
}
});

View File

@ -21,11 +21,9 @@ class SwarmProcess extends ProcessWrapper {
{
if (err) {
console.error(err);
//process.exit(1);
return;
process.exit(1);
}
console.log('Complete?')
//process.exit();
process.exit();
});
}
}