Skip to content

Commit

Permalink
fix(@embark/core): Support legacy Parity version parsing
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
emizzle authored and iurimatias committed Dec 21, 2018
1 parent a91a4dd commit 1ccc3e7
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/lib/modules/blockchain_process/parityClient.js
Original file line number Diff line number Diff line change
Expand Up @@ -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();
}
Expand Down

0 comments on commit 1ccc3e7

Please sign in to comment.