Add '-Force' to Move-Item to fix the GitHub workflow (#19262)

This commit is contained in:
Dongbo Wang
2023-03-02 19:58:42 +00:00
committed by GitHub
parent 118db90626
commit 25f7bbc9c2
+3 -3
View File
@@ -117,20 +117,20 @@ jobs:
Write-Verbose -Verbose "Create PR Windows == $createPrWin"
$createPrLinux = ShouldCreatePR $currentLinuxFile $newLinuxFile
Write-Verbose -Verbose "Create PR Windows == $createPrLinux"
Write-Verbose -Verbose "Create PR Linux == $createPrLinux"
$createPr = $createPrWin -or $createPrLinux
Write-Verbose -Verbose "Create PR == $createPr"
if ($createPrWin) {
Move-Item $newWinFile $currentWinFile -Verbose
Move-Item $newWinFile $currentWinFile -Verbose -Force
}
else {
Remove-Item $newWinFile -Verbose
}
if ($createPrLinux) {
Move-Item $newLinuxFile $currentLinuxFile -Verbose
Move-Item $newLinuxFile $currentLinuxFile -Verbose -Force
}
else {
Remove-Item $newLinuxFile -Verbose