From 891a4e0a0fc8d45b4ce6b7bb2611f99c007e331b Mon Sep 17 00:00:00 2001 From: Jonathan Rainville Date: Mon, 16 Apr 2018 11:38:46 -0400 Subject: [PATCH] fix versions with spaces and add warning --- lib/versions/library_manager.js | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/lib/versions/library_manager.js b/lib/versions/library_manager.js index cba75a8a..3589a837 100644 --- a/lib/versions/library_manager.js +++ b/lib/versions/library_manager.js @@ -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() {