Fix a bug in install-powershell.ps1 (#17794)

This commit is contained in:
Chuckie Chen
2022-08-02 14:25:12 -07:00
committed by GitHub
parent 0e4d2e40cd
commit cd380bc11a
+1 -1
View File
@@ -125,7 +125,7 @@ Function Remove-Destination([string] $Destination) {
if ($IsWinEnv -and ($Destination -eq $PSHOME)) {
# handle the case where the updated folder is currently in use
Get-ChildItem -Recurse -File -Path $PSHOME | ForEach-Object {
if ($_.extension -eq "old") {
if ($_.extension -eq ".old") {
Remove-Item $_
} else {
Move-Item $_.fullname "$($_.fullname).old"