mirror of
https://github.com/actions/runner-images-sangeeth.git
synced 2025-12-13 21:36:46 +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
@@ -386,3 +386,22 @@ function Test-IsWin16
|
||||
{
|
||||
(Get-WinVersion) -match "2016"
|
||||
}
|
||||
|
||||
function Extract-7Zip {
|
||||
param
|
||||
(
|
||||
[Parameter(Mandatory=$true)]
|
||||
[string]$Path,
|
||||
[Parameter(Mandatory=$true)]
|
||||
[string]$DestinationPath
|
||||
)
|
||||
|
||||
Write-Host "Expand archive '$PATH' to '$DestinationPath' directory"
|
||||
7z.exe x "$Path" -o"$DestinationPath" -y | Out-Null
|
||||
|
||||
if ($LASTEXITCODE -ne 0)
|
||||
{
|
||||
Write-Host "There is an error during expanding '$Path' to '$DestinationPath' directory"
|
||||
exit 1
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user