From 93ac2ebfbb1a0a4421e4f05c905fcc3389fac8b3 Mon Sep 17 00:00:00 2001 From: Maria Zhelezova <43066499+mazhelez@users.noreply.github.com> Date: Tue, 29 Oct 2024 13:40:00 +0100 Subject: [PATCH] Fix CheckRelativePath (#3740) `Run-AlPipeline` fails with message like: ``` Error: AL1033 An error occurred while loading the included rule set file c:\sources\..\..\..\src\rulesets\ruleset.json - Could not find a part of the path 'c:\src\rulesets\ruleset.json'. ``` E.g. https://github.com/microsoft/BCApps/actions/runs/11567038300/job/32196982417?pr=2272 --- AppHandling/Run-AlPipeline.ps1 | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/AppHandling/Run-AlPipeline.ps1 b/AppHandling/Run-AlPipeline.ps1 index 234b90c6a..1f0992a0e 100644 --- a/AppHandling/Run-AlPipeline.ps1 +++ b/AppHandling/Run-AlPipeline.ps1 @@ -419,7 +419,7 @@ Param( function CheckRelativePath([string] $baseFolder, [string] $sharedFolder, $path, $name) { if ($path -and $path -notlike 'https://*') { if (-not [System.IO.Path]::IsPathRooted($path)) { - if (Test-Path -path (Join-Path $baseFolder $path) -PathType Container) { + if (Test-Path -Path (Join-Path $baseFolder $path)) { $path = Join-Path $baseFolder $path -Resolve } else {