Skip to content

Commit 4fa523b

Browse files
🩹 [Patch]: Normalize path separators in PSScriptAnalyzer tests
1 parent 65f7758 commit 4fa523b

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

scripts/tests/PSScriptAnalyzer/PSScriptAnalyzer.Tests.ps1

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -74,9 +74,9 @@ Describe 'PSScriptAnalyzer' {
7474
}
7575
$Path = Resolve-Path -Path $Path | Select-Object -ExpandProperty Path
7676
$relativePath = if ($Path.StartsWith($PSScriptRoot)) {
77-
$Path.Replace($PSScriptRoot, 'Action:').Trim('\').Trim('/')
77+
$Path.Replace($PSScriptRoot, 'Action:').Trim('\').Trim('/').Replace('\', '/')
7878
} elseif ($Path.StartsWith($env:GITHUB_WORKSPACE)) {
79-
$Path.Replace($env:GITHUB_WORKSPACE, 'Workspace:').Trim('\').Trim('/')
79+
$Path.Replace($env:GITHUB_WORKSPACE, 'Workspace:').Trim('\').Trim('/').Replace('\', '/')
8080
} else {
8181
$Path
8282
}

0 commit comments

Comments
 (0)