warn about path depth

This commit is contained in:
Iuri Matias 2018-05-23 11:08:32 -04:00
parent f2fe9efd22
commit fe4dd67979
1 changed files with 10 additions and 0 deletions

View File

@ -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) => {