conflict in en.json

This commit is contained in:
Jonathan Rainville 2018-05-28 11:55:16 -04:00
parent d36af9f5e1
commit 3f671c2fb0
3 changed files with 25 additions and 7 deletions

View File

@ -55,6 +55,20 @@ var Blockchain = function(options) {
this.config.datadir = fs.embarkPath(".embark/development/datadir");
}
const spaceMessage = 'The path for %s in blockchain config contains spaces, please remove them';
if (this.config.datadir.indexOf(' ') > 0) {
console.error(__(spaceMessage, 'datadir'));
process.exit();
}
if (this.config.account.password.indexOf(' ') > 0) {
console.error(__(spaceMessage, 'account.password'));
process.exit();
}
if (this.config.genesisBlock.indexOf(' ') > 0) {
console.error(__(spaceMessage, 'genesisBlock'));
process.exit();
}
this.client = new options.client({config: this.config, env: this.env, isDev: this.isDev});
};
@ -154,7 +168,7 @@ Blockchain.prototype.checkPathLength = function() {
};
Blockchain.prototype.isClientInstalled = function(callback) {
let versionCmd = this.client.determineVersion();
let versionCmd = this.client.determineVersionCommand();
this.runCommand(versionCmd, {}, (err, stdout, stderr) => {
if (err || stderr || !stdout || stdout.indexOf("not found") >= 0) {
return callback('Geth not found');

View File

@ -17,7 +17,7 @@ class GethCommands {
cmd.push(this.determineNetworkType(config));
if (config.datadir) {
cmd.push("--datadir=" + config.datadir);
cmd.push(`--datadir=${config.datadir}`);
}
if (config.light) {
@ -29,7 +29,7 @@ class GethCommands {
}
if (config.account && config.account.password) {
cmd.push("--password=" + config.account.password);
cmd.push(`--password=${config.account.password}`);
}
if (Number.isInteger(config.verbosity) && config.verbosity >=0 && config.verbosity <= 5) {
@ -39,7 +39,7 @@ class GethCommands {
return cmd;
}
determineVersion() {
determineVersionCommand() {
return this.geth_bin + " version";
}
@ -60,18 +60,18 @@ class GethCommands {
let cmd = this.geth_bin + " " + this.commonOptions().join(' ');
if (config.genesisBlock) {
cmd += "init \"" + config.genesisBlock + "\" ";
cmd += " init \"" + config.genesisBlock + "\" ";
}
return cmd;
}
newAccountCommand() {
return this.geth_bin + " " + this.commonOptions().join(' ') + "account new ";
return this.geth_bin + " " + this.commonOptions().join(' ') + " account new ";
}
listAccountsCommand() {
return this.geth_bin + " " + this.commonOptions().join(' ') + "account list ";
return this.geth_bin + " " + this.commonOptions().join(' ') + " account list ";
}
determineRpcOptions(config) {

View File

@ -139,6 +139,10 @@
"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",
"successfully uploaded to swarm": "successfully uploaded to swarm",
"ipfs process started": "ipfs process started",
"no accounts found": "no accounts found",
"initializing genesis block": "initializing genesis block",
"The path for %s in blockchain config contains spaces, please remove them": "The path for %s in blockchain config contains spaces, please remove them",
"Blockchain process ended before the end of this process. Code: %s": "Blockchain process ended before the end of this process. Code: %s",
"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...",