mirror of https://github.com/embarklabs/embark.git
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:
parent
a91a4dd7c0
commit
1ccc3e7796
|
@ -120,7 +120,7 @@ class ParityClient {
|
||||||
|
|
||||||
parseVersion(rawVersionOutput) {
|
parseVersion(rawVersionOutput) {
|
||||||
let parsed;
|
let parsed;
|
||||||
const match = rawVersionOutput.match(/version Parity-Ethereum\/(.*?)\//);
|
const match = rawVersionOutput.match(/version Parity(?:-Ethereum)?\/(.*?)\//);
|
||||||
if (match) {
|
if (match) {
|
||||||
parsed = match[1].trim();
|
parsed = match[1].trim();
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue