mirror of https://github.com/embarklabs/embark.git
test if client version is supported, warn if not or can't determine
This commit is contained in:
parent
901d1f8e32
commit
09a5ea8ba1
|
@ -305,6 +305,13 @@ Blockchain.prototype.isClientInstalled = function (callback) {
|
|||
if (err || !stdout || stderr.indexOf("not found") >= 0 || stdout.indexOf("not found") >= 0) {
|
||||
return callback(__('Ethereum client bin not found:') + ' ' + this.client.getBinaryPath());
|
||||
}
|
||||
const parsedVersion = this.client.parseVersion(stdout);
|
||||
const supported = this.client.isSupportedVersion(parsedVersion);
|
||||
if (supported === undefined) {
|
||||
this.logger.error((__('WARNING! Ethereum client version could not be determined or compared with version range') + ' ' + this.client.versSupported + __(', for best results please use a supported version')).yellow);
|
||||
} else if (!supported) {
|
||||
this.logger.error((__('WARNING! Ethereum client version unsupported, for best results please use a version in range') + ' ' + this.client.versSupported).yellow);
|
||||
}
|
||||
callback();
|
||||
});
|
||||
};
|
||||
|
|
Loading…
Reference in New Issue