fix(@embark/core): Support legacy Parity version parsing

Parse legacy version of Parity. Pre-version 2 of Parity outputs “Parity <version>” instead of the post-version 2 “Parity-Ethereum”. Embark was emitting an error when the version of an older Parity client could not be parsed, and no warning messages regarding the version were shown.

This PR modifies the regex that parses the version so that older versions of Parity can be detected and the appropriate warning message can appear.
This commit is contained in:
emizzle 2018-12-21 19:09:51 +11:00 committed by Iuri Matias
parent a91a4dd7c0
commit 1ccc3e7796
1 changed files with 1 additions and 1 deletions

View File

@ -120,7 +120,7 @@ class ParityClient {
parseVersion(rawVersionOutput) {
let parsed;
const match = rawVersionOutput.match(/version Parity-Ethereum\/(.*?)\//);
const match = rawVersionOutput.match(/version Parity(?:-Ethereum)?\/(.*?)\//);
if (match) {
parsed = match[1].trim();
}