Merge pull request #376 from embark-framework/tolerate_node_names

if node version name doesn't have /, then just use the full name
This commit is contained in:
Iuri Matias 2018-04-23 12:17:49 -04:00 committed by GitHub
commit edb6876d7a
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 3 additions and 0 deletions

View File

@ -222,6 +222,9 @@ class Engine {
if (err) {
return cb({name: "Ethereum node (version unknown)", status: 'on'});
}
if (version.indexOf("/") < 0) {
return cb({name: version, status: 'on'});
}
let nodeName = version.split("/")[0];
let versionNumber = version.split("/")[1].split("-")[0];
let name = nodeName + " " + versionNumber + " (Ethereum)";