Skip to content

Commit

Permalink
Fix CheckRelativePath (#3740)
Browse files Browse the repository at this point in the history
`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
  • Loading branch information
mazhelez authored Oct 29, 2024
1 parent f9715e0 commit 93ac2eb
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion AppHandling/Run-AlPipeline.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand Down

0 comments on commit 93ac2eb

Please sign in to comment.