Skip to content

Commit 891a4e0

Browse files
committed
fix versions with spaces and add warning
1 parent f9b7f5c commit 891a4e0

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

lib/versions/library_manager.js

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,14 @@ class LibraryManager {
2727
this.versions['solc'] = solcVersionInConfig;
2828
this.versions['web3'] = web3VersionInConfig;
2929
this.versions['ipfs-api'] = ipfsApiVersion;
30+
31+
Object.keys(this.versions).forEach(versionKey => {
32+
const newVersion = this.versions[versionKey].trim();
33+
if (newVersion !== this.versions[versionKey]) {
34+
this.embark.logger.warn(`There a a space in the version of ${versionKey}. We corrected it for you ("${this.versions[versionKey]}" => "${newVersion}").`);
35+
this.versions[versionKey] = newVersion;
36+
}
37+
});
3038
}
3139

3240
registerCommands() {

0 commit comments

Comments
 (0)