Merge pull request #365 from embark-framework/bug_fix/fix-versions-with-spaces

Fix versions with spaces and add warning
This commit is contained in:
Iuri Matias 2018-04-16 12:07:02 -04:00 committed by GitHub
commit ad136802da
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -27,6 +27,14 @@ class LibraryManager {
this.versions['solc'] = solcVersionInConfig;
this.versions['web3'] = web3VersionInConfig;
this.versions['ipfs-api'] = ipfsApiVersion;
Object.keys(this.versions).forEach(versionKey => {
const newVersion = this.versions[versionKey].trim();
if (newVersion !== this.versions[versionKey]) {
this.embark.logger.warn(`There a a space in the version of ${versionKey}. We corrected it for you ("${this.versions[versionKey]}" => "${newVersion}").`);
this.versions[versionKey] = newVersion;
}
});
}
registerCommands() {