Skip to content

Commit 1ccc3e7

Browse files
emizzleiurimatias
authored andcommitted
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.
1 parent a91a4dd commit 1ccc3e7

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/lib/modules/blockchain_process/parityClient.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -120,7 +120,7 @@ class ParityClient {
120120

121121
parseVersion(rawVersionOutput) {
122122
let parsed;
123-
const match = rawVersionOutput.match(/version Parity-Ethereum\/(.*?)\//);
123+
const match = rawVersionOutput.match(/version Parity(?:-Ethereum)?\/(.*?)\//);
124124
if (match) {
125125
parsed = match[1].trim();
126126
}

0 commit comments

Comments
 (0)