mirror of
https://github.com/actions/runner-images-sangeeth.git
synced 2025-12-20 06:29:50 +00:00
Switch Expand-Archive to 7zip on Windows image generation (#861)
* switch expand-archive to 7zip on windows
This commit is contained in:
committed by
GitHub
parent
ffa2110464
commit
3e9c8e5afc
@@ -2,21 +2,21 @@
|
||||
## File: Install-SeleniumWebDrivers.ps1
|
||||
## Desc: Install Selenium Web Drivers
|
||||
################################################################################
|
||||
$DestinationPath = "$($env:SystemDrive)\";
|
||||
$DestinationPath = "$($env:SystemDrive)\"
|
||||
$DriversZipFile = "SeleniumWebDrivers.zip"
|
||||
Write-Host "Destination path: [$DestinationPath]";
|
||||
Write-Host "Selenium drivers download and install...";
|
||||
Write-Host "Destination path: [$DestinationPath]"
|
||||
Write-Host "Selenium drivers download and install..."
|
||||
try {
|
||||
Invoke-WebRequest -UseBasicParsing -Uri "https://seleniumwebdrivers.blob.core.windows.net/seleniumwebdrivers/${DriversZipFile}" -OutFile $DriversZipFile;
|
||||
Invoke-WebRequest -UseBasicParsing -Uri "https://seleniumwebdrivers.blob.core.windows.net/seleniumwebdrivers/${DriversZipFile}" -OutFile $DriversZipFile
|
||||
}
|
||||
catch {
|
||||
Write-Error "[!] Failed to download $DriversZipFile";
|
||||
exit 1;
|
||||
Write-Error "[!] Failed to download $DriversZipFile"
|
||||
exit 1
|
||||
}
|
||||
|
||||
$TempSeleniumDir = Join-Path $Env:TEMP "SeleniumWebDrivers"
|
||||
Expand-Archive -Path $DriversZipFile -DestinationPath $Env:TEMP -Force;
|
||||
Remove-Item $DriversZipFile;
|
||||
Extract-7Zip -Path $DriversZipFile -DestinationPath $Env:TEMP
|
||||
Remove-Item $DriversZipFile
|
||||
|
||||
$SeleniumWebDriverPath = Join-Path $DestinationPath "SeleniumWebDrivers"
|
||||
$IEDriverPathTemp = Join-Path $TempSeleniumDir 'IEDriver'
|
||||
@@ -29,4 +29,4 @@ Move-Item -Path "$IEDriverPathTemp" -Destination $SeleniumWebDriverPath
|
||||
|
||||
Write-Host "Setting the environment variables"
|
||||
|
||||
setx IEWebDriver "C:\SeleniumWebDrivers\IEDriver" /M;
|
||||
setx IEWebDriver "C:\SeleniumWebDrivers\IEDriver" /M
|
||||
|
||||
Reference in New Issue
Block a user