mirror of
https://github.com/actions/runner-images-sangeeth.git
synced 2025-12-20 06:29:50 +00:00
Add support for latest zstd (#2927)
This commit is contained in:
committed by
GitHub
parent
d6cc9d0e40
commit
51a9c11e33
@@ -10,8 +10,15 @@ $zstdArchivePath = Start-DownloadWithRetry -Url $zstdLatest -Name "zstd-win64.zi
|
|||||||
|
|
||||||
$toolPath = "C:\tools"
|
$toolPath = "C:\tools"
|
||||||
$zstdPath = Join-Path $toolPath zstd
|
$zstdPath = Join-Path $toolPath zstd
|
||||||
Extract-7Zip -Path $zstdArchivePath -DestinationPath $toolPath
|
$zstdParentName = [IO.Path]::GetFileNameWithoutExtension($zstdLatest)
|
||||||
Move-Item -Path "${zstdPath}*" -Destination $zstdPath
|
$filesInArchive = 7z l $zstdArchivePath | Out-String
|
||||||
|
|
||||||
|
if ($filesInArchive.Contains($zstdParentName)) {
|
||||||
|
Extract-7Zip -Path $zstdArchivePath -DestinationPath $toolPath
|
||||||
|
Move-Item -Path "${zstdPath}*" -Destination $zstdPath
|
||||||
|
} else {
|
||||||
|
Extract-7Zip -Path $zstdArchivePath -DestinationPath $zstdPath
|
||||||
|
}
|
||||||
|
|
||||||
# Add zstd-win64 to PATH
|
# Add zstd-win64 to PATH
|
||||||
Add-MachinePathItem $zstdPath
|
Add-MachinePathItem $zstdPath
|
||||||
|
|||||||
Reference in New Issue
Block a user