From 4fa523b427f568e80e60b594f63856a5c68cac72 Mon Sep 17 00:00:00 2001 From: Marius Storhaug Date: Thu, 6 Mar 2025 22:19:11 +0100 Subject: [PATCH] =?UTF-8?q?=F0=9F=A9=B9=20[Patch]:=20Normalize=20path=20se?= =?UTF-8?q?parators=20in=20PSScriptAnalyzer=20tests?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- scripts/tests/PSScriptAnalyzer/PSScriptAnalyzer.Tests.ps1 | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/scripts/tests/PSScriptAnalyzer/PSScriptAnalyzer.Tests.ps1 b/scripts/tests/PSScriptAnalyzer/PSScriptAnalyzer.Tests.ps1 index 7923a07..d8298ed 100644 --- a/scripts/tests/PSScriptAnalyzer/PSScriptAnalyzer.Tests.ps1 +++ b/scripts/tests/PSScriptAnalyzer/PSScriptAnalyzer.Tests.ps1 @@ -74,9 +74,9 @@ Describe 'PSScriptAnalyzer' { } $Path = Resolve-Path -Path $Path | Select-Object -ExpandProperty Path $relativePath = if ($Path.StartsWith($PSScriptRoot)) { - $Path.Replace($PSScriptRoot, 'Action:').Trim('\').Trim('/') + $Path.Replace($PSScriptRoot, 'Action:').Trim('\').Trim('/').Replace('\', '/') } elseif ($Path.StartsWith($env:GITHUB_WORKSPACE)) { - $Path.Replace($env:GITHUB_WORKSPACE, 'Workspace:').Trim('\').Trim('/') + $Path.Replace($env:GITHUB_WORKSPACE, 'Workspace:').Trim('\').Trim('/').Replace('\', '/') } else { $Path }