diff --git a/lib/cmds/blockchain/blockchain.js b/lib/cmds/blockchain/blockchain.js index c1143e8ff..787e1de31 100644 --- a/lib/cmds/blockchain/blockchain.js +++ b/lib/cmds/blockchain/blockchain.js @@ -106,9 +106,10 @@ Blockchain.prototype.run = function() { } const child = self.runCommand(cmd, {}, (err, stdout, _stderr) => { if (err && self.env === 'development' && stdout.indexOf('Failed to unlock') > 0) { - console.warn('\n' + __('Development blockchain has changed to use the --dev option.').yellow); - console.warn(__('You can reset your workspace to fix the problem with').yellow + ' embark reset'.cyan); - console.warn(__('Otherwise, you can change your data directory in blockchain.json (datadir)').yellow); + // console.error is captured and sent to the console output regardless of silent setting + console.error('\n' + __('Development blockchain has changed to use the --dev option.').yellow); + console.error(__('You can reset your workspace to fix the problem with').yellow + ' embark reset'.cyan); + console.error(__('Otherwise, you can change your data directory in blockchain.json (datadir)').yellow); } }); if (self.onReadyCallback) { @@ -134,10 +135,12 @@ Blockchain.prototype.run = function() { Blockchain.prototype.checkPathLength = function() { let dappPath = fs.dappPath(''); - if (dappPath.split('/').length > 5) { - console.log("===============================================================================".yellow); - console.log("===========> Path depth is too long ".yellow + dappPath); - console.log("===========> This is known to cause issues with some applications, please consider putting your dapp in a different path".yellow); + if (dappPath.length > 66) { + // console.error is captured and sent to the console output regardless of silent setting + console.error("===============================================================================".yellow); + console.error("===========> ".yellow + __('WARNING! DApp path length is too long: ').yellow + dappPath.yellow); + console.error("===========> ".yellow + __('This is known to cause issues with starting geth, please consider reducing your DApp path\'s length to 66 characters or less.').yellow); + console.error("===============================================================================".yellow); } }; diff --git a/lib/i18n/locales/en.json b/lib/i18n/locales/en.json index 58593c9f5..75427395d 100644 --- a/lib/i18n/locales/en.json +++ b/lib/i18n/locales/en.json @@ -128,6 +128,11 @@ "Error while downloading the file": "Error while downloading the file", "Error while loading the content of ": "Error while loading the content of ", "no contracts found": "no contracts found", + "DApp path length is too long: \"": "DApp path length is too long: \"", + "This is known to cause issues with some applications, please consider reducing your DApp path's length to 66 characters or less.": "This is known to cause issues with some applications, please consider reducing your DApp path's length to 66 characters or less.", + "DApp path length is too long: ": "DApp path length is too long: ", + "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...", "Next steps:": "Next steps:", "open another console in the same directory and run": "open another console in the same directory and run", diff --git a/lib/processes/blockchainProcessLauncher.js b/lib/processes/blockchainProcessLauncher.js index 55c9af0b5..4c5101f8a 100644 --- a/lib/processes/blockchainProcessLauncher.js +++ b/lib/processes/blockchainProcessLauncher.js @@ -25,7 +25,7 @@ class BlockchainProcessLauncher { logger: this.logger, events: this.events, normalizeInput: this.normalizeInput, - silent: true, + silent: this.logger.logLevel !== 'trace', exitCallback: this.processEnded.bind(this) }); this.blockchainProcess.send({