From fe4dd67979b7a5bbd032370b11d8c7f3db7a3831 Mon Sep 17 00:00:00 2001 From: Iuri Matias Date: Wed, 23 May 2018 11:08:32 -0400 Subject: [PATCH] warn about path depth --- lib/cmds/blockchain/blockchain.js | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/lib/cmds/blockchain/blockchain.js b/lib/cmds/blockchain/blockchain.js index 254f5ce8..c016eb3a 100644 --- a/lib/cmds/blockchain/blockchain.js +++ b/lib/cmds/blockchain/blockchain.js @@ -73,6 +73,7 @@ Blockchain.prototype.run = function() { console.log("===============================================================================".magenta); console.log("===============================================================================".magenta); + this.warnAboutPath(); let address = ''; async.waterfall([ function checkInstallation(next) { @@ -131,6 +132,15 @@ Blockchain.prototype.run = function() { }); }; +Blockchain.prototype.warnAboutPath = 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); + } +}; + Blockchain.prototype.isClientInstalled = function(callback) { let versionCmd = this.client.determineVersion(); this.runCommand(versionCmd, {}, (err, stdout, stderr) => {