Correct case of $Matches special variable

This commit is contained in:
xtqqczze
2020-01-13 19:15:17 +00:00
parent f86f30cf64
commit 89e33f5772
7 changed files with 10 additions and 10 deletions
@@ -515,7 +515,7 @@ Describe "PSModulePath changes interacting with other PowerShell processes" -Tag
It "Does not duplicate the System32 module path in subprocesses" {
$sys32ModPathCount = & $pwsh -C {
& "$PSHOME/pwsh" -C '$null = $env:PSModulePath -match ([regex]::Escape((Join-Path $env:windir "System32" "WindowsPowerShell" "v1.0" "Modules"))); $matches.Count'
& "$PSHOME/pwsh" -C '$null = $env:PSModulePath -match ([regex]::Escape((Join-Path $env:windir "System32" "WindowsPowerShell" "v1.0" "Modules"))); $Matches.Count'
}
$sys32ModPathCount | Should -Be 1