Skip to content

Commit 2a4e5ac

Browse files
committed
Fix path trimmer to actually count length of original path
1 parent 5c7eb64 commit 2a4e5ac

1 file changed

Lines changed: 7 additions & 6 deletions

File tree

.github/workflows/make_packages.yml

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -75,11 +75,17 @@ jobs:
7575
run: |
7676
$pathArray = $env:PATH -split ';'
7777
78+
Write-Host "Original PATH length: $($env:PATH.Length)"
79+
Write-Host "Total Number of Entries: $($pathArray.Count)"
80+
Write-Host "`nDirectory List:"
81+
$pathArray | Select-Object @{Name="Length"; Expression={$_.Length}}, @{Name="Path"; Expression={$_}} | Sort-Object Length -Descending | Format-Table -AutoSize
82+
7883
# Define patterns to exclude
7984
$filteredPath = $pathArray | Where-Object {
8085
$_ -notmatch "MongoDB" -and
8186
$_ -notmatch "ImageMagick" -and
82-
$_ -notmatch "Java"
87+
$_ -notmatch "Java" -and
88+
$_ -notmatch "SQL Server"
8389
}
8490
8591
$newPath = $filteredPath -join ';'
@@ -88,12 +94,7 @@ jobs:
8894
$env:PATH = $newPath
8995
echo "PATH=$newPath" >> $env:GITHUB_ENV
9096
91-
Write-Host "Original PATH length: $($env:PATH.Length)"
9297
Write-Host "Trimmed PATH length: $($newPath.Length)"
93-
Write-Host "Total Number of Entries: $($newPath.Count)"
94-
Write-Host "`nDirectory List:"
95-
96-
$pathArray | Select-Object @{Name="Length"; Expression={$_.Length}}, @{Name="Path"; Expression={$_}} | Sort-Object Length -Descending | Format-Table -AutoSize
9798
9899
- name: Build (Windows)
99100
if: runner.os == 'Windows'

0 commit comments

Comments
 (0)