Skip to content

Commit

Permalink
[Windows] zstd: Invoke Move-Item with retry (#4633)
Browse files Browse the repository at this point in the history
  • Loading branch information
al-cheb authored Nov 30, 2021
1 parent 248e672 commit f4306a6
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion images/win/scripts/Installers/Install-Zstd.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,9 @@ $filesInArchive = 7z l $zstdArchivePath | Out-String

if ($filesInArchive.Contains($zstdParentName)) {
Extract-7Zip -Path $zstdArchivePath -DestinationPath $toolPath
Move-Item -Path "${zstdPath}*" -Destination $zstdPath
Invoke-SBWithRetry -Command {
Move-Item -Path "${zstdPath}*" -Destination $zstdPath -ErrorAction Stop
}
} else {
Extract-7Zip -Path $zstdArchivePath -DestinationPath $zstdPath
}
Expand Down

0 comments on commit f4306a6

Please sign in to comment.