Skip to content

Commit 6a95aa4

Browse files
author
TravkinAlex
authored
fix(chromedriver): don't ignore patch version
1 parent c48143c commit 6a95aa4

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

lib/binaries/chrome_xml.ts

+3-2
Original file line numberDiff line numberDiff line change
@@ -175,11 +175,12 @@ export function getValidSemver(version: string): string {
175175
// no-op: is this is not valid, do not throw here.
176176
}
177177
// This supports downloading 74.0.3729.6
178+
// Removing the 0 after 74, to keep patch version of webdriver
178179
try {
179-
const newRegex = /(\d+.\d+.\d+).\d+/g;
180+
const newRegex = /(\d+.)\d+.(\d+.\d+)/g;
180181
const exec = newRegex.exec(version);
181182
if (exec) {
182-
lookUpVersion = exec[1];
183+
lookUpVersion = exec[1] + exec[2];
183184
}
184185
} catch (_) {
185186
// no-op: if this does not work, use the other regex pattern.

0 commit comments

Comments
 (0)