From f4306a6c4010513067dd35e5dcf8634112366d38 Mon Sep 17 00:00:00 2001 From: Aleksandr Chebotov <47745270+al-cheb@users.noreply.github.com> Date: Tue, 30 Nov 2021 11:38:03 +0300 Subject: [PATCH] [Windows] zstd: Invoke Move-Item with retry (#4633) --- images/win/scripts/Installers/Install-Zstd.ps1 | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/images/win/scripts/Installers/Install-Zstd.ps1 b/images/win/scripts/Installers/Install-Zstd.ps1 index f29ea5813..0dd403c02 100644 --- a/images/win/scripts/Installers/Install-Zstd.ps1 +++ b/images/win/scripts/Installers/Install-Zstd.ps1 @@ -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 }