Skip to content

Commit

Permalink
feat: ✨ add chromeapp variable for Windows script
Browse files Browse the repository at this point in the history
  • Loading branch information
MickaelFontes committed Nov 24, 2024
1 parent ec367c5 commit dc294c4
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 5 deletions.
10 changes: 8 additions & 2 deletions lib/setup-chromedriver.ps1
Original file line number Diff line number Diff line change
@@ -1,9 +1,15 @@
Param(
[string]$version
[string]$version,
[string]$chromeapp
)

if([string]::IsNullOrEmpty($chromeapp))
{
$chromeapp = "C:\Program Files\Google\Chrome\Application\chrome.exe"
}

$json_url = "https://googlechromelabs.github.io/chrome-for-testing/known-good-versions-with-downloads.json"
$chrome_fullversion = (Get-Item "C:\Program Files\Google\Chrome\Application\chrome.exe").VersionInfo.FileVersion
$chrome_fullversion = (Get-Item $chromeapp).VersionInfo.FileVersion

Write-Output "Chrome version: $chrome_fullversion"
if([string]::IsNullOrEmpty($version))
Expand Down
7 changes: 4 additions & 3 deletions src/setup-chromedriver.ts
Original file line number Diff line number Diff line change
Expand Up @@ -22,9 +22,10 @@ async function run() {
}
if (arch == "win32") {
await exec.exec(
"powershell -File " +
path.join(__dirname, "../lib", "setup-chromedriver.ps1 " + version),
);
"powershell -File " + path.join(__dirname, "../lib", "setup-chromedriver.ps1 "), [
version,
chromeapp
]);
} else {
await exec.exec(path.join(__dirname, "../lib", "setup-chromedriver.sh"), [
version,
Expand Down

0 comments on commit dc294c4

Please sign in to comment.