From cd380bc11acc5d8ecb0da79d08cf6f2cc791ff5a Mon Sep 17 00:00:00 2001 From: Chuckie Chen Date: Wed, 3 Aug 2022 05:25:12 +0800 Subject: [PATCH] Fix a bug in `install-powershell.ps1` (#17794) --- tools/install-powershell.ps1 | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tools/install-powershell.ps1 b/tools/install-powershell.ps1 index 58b6c72294..b6c8f595cc 100644 --- a/tools/install-powershell.ps1 +++ b/tools/install-powershell.ps1 @@ -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"