mirror of
https://github.com/PowerShell/PowerShell.git
synced 2024-11-26 19:34:22 +08:00
Fix typo in Reset-PWSHSystemPath.ps1 (#20632)
occurances -> occurrences
This commit is contained in:
parent
c8afc18404
commit
504b6e0e6b
@ -58,7 +58,7 @@ ForEach ($PathScopeItem in $PathScope)
|
|||||||
$pathstoremove = @([Environment]::GetEnvironmentVariable("PATH","$PathScopeItem").split(';') | Where-Object { $_ -ilike "*\Program Files\Powershell\6*"})
|
$pathstoremove = @([Environment]::GetEnvironmentVariable("PATH","$PathScopeItem").split(';') | Where-Object { $_ -ilike "*\Program Files\Powershell\6*"})
|
||||||
If (!$RemoveAllOccurences)
|
If (!$RemoveAllOccurences)
|
||||||
{
|
{
|
||||||
#If we are not removing all occurances of PowerShell paths, then remove the highest sorted path from the filter
|
#If we are not removing all occurrences of PowerShell paths, then remove the highest sorted path from the filter
|
||||||
$pathstoremove = @($pathstoremove | Sort-Object | Select-Object -SkipLast 1)
|
$pathstoremove = @($pathstoremove | Sort-Object | Select-Object -SkipLast 1)
|
||||||
}
|
}
|
||||||
Write-Verbose "Reset-PWSHSystemPath: Found $($pathstoremove.count) paths to remove from $PathScopeItem path scope: $($Pathstoremove -join ', ' | Out-String)"
|
Write-Verbose "Reset-PWSHSystemPath: Found $($pathstoremove.count) paths to remove from $PathScopeItem path scope: $($Pathstoremove -join ', ' | Out-String)"
|
||||||
|
Loading…
Reference in New Issue
Block a user