From 705e1218cbccb5e5e4eba92d21df6d9280d28939 Mon Sep 17 00:00:00 2001 From: mingyaulee Date: Mon, 18 Sep 2023 02:16:11 +0800 Subject: [PATCH] Fix version selector --- lib/setup-chromedriver.ps1 | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/setup-chromedriver.ps1 b/lib/setup-chromedriver.ps1 index 6bf17693..4e701812 100644 --- a/lib/setup-chromedriver.ps1 +++ b/lib/setup-chromedriver.ps1 @@ -41,7 +41,7 @@ if (!$url) Write-Output "Falling back to latest version of ChromeDriver for $arch" $version3 = $version.Substring(0, $version.LastIndexOf('.')) Write-Output "VERSION3 = $version3" - $version = $json | ConvertFrom-Json | Select-Object -ExpandProperty versions | Where-Object { $_.version -like "$version3.*" } | Select-Object -Last 1 -ExpandProperty version + $version = $json | Select-Object -ExpandProperty versions | Where-Object { $_.version -like "$version3.*" } | Select-Object -Last 1 -ExpandProperty version Write-Output "VERSION = $version" $url = $json | Select-Object -ExpandProperty versions | Where-Object { $_.version -eq $version } | Select-Object -ExpandProperty downloads | Select-Object -ExpandProperty chromedriver | Where-Object { $_.platform -eq $arch } | Select-Object -ExpandProperty url }