Merge pull request #453 from embark-framework/warn_about_long_paths

warn about path depth
This commit is contained in:
Iuri Matias 2018-05-23 12:34:23 -04:00 committed by GitHub
commit 87cd371894
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -73,6 +73,7 @@ Blockchain.prototype.run = function() {
console.log("===============================================================================".magenta);
console.log("===============================================================================".magenta);
this.checkPathLength();
let address = '';
async.waterfall([
function checkInstallation(next) {
@ -131,6 +132,15 @@ 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);
}
};
Blockchain.prototype.isClientInstalled = function(callback) {
let versionCmd = this.client.determineVersion();
this.runCommand(versionCmd, {}, (err, stdout, stderr) => {