Skip to content

Commit a7e7519

Browse files
committed
fix(ci): use cross-platform temp dir in fetch-ontario-design-system.ps1
$env:TEMP is undefined on Linux GitHub runners, which made the build job fail at the 'Fetch Ontario Design System assets' step with 'Cannot bind argument to parameter Path because it is null'. Switch to [System.IO.Path]::GetTempPath() which resolves correctly on Windows, macOS, and Linux pwsh.
1 parent 94beaae commit a7e7519

1 file changed

Lines changed: 3 additions & 1 deletion

File tree

scripts/fetch-ontario-design-system.ps1

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,9 @@ if (-not (Test-Path $AbsVendorDir)) {
5050
}
5151

5252
$zipUrl = "https://designsystem.ontario.ca/dist/ontario-design-system-dist-$Version.zip"
53-
$zipPath = Join-Path $env:TEMP "ontario-design-system-$Version.zip"
53+
# Use [System.IO.Path]::GetTempPath() so this works on Linux GitHub runners
54+
# (where $env:TEMP is undefined) as well as Windows/macOS.
55+
$zipPath = Join-Path ([System.IO.Path]::GetTempPath()) "ontario-design-system-$Version.zip"
5456

5557
if (Test-Path $zipPath) { Remove-Item $zipPath -Force }
5658
$ProgressPreference = 'SilentlyContinue'

0 commit comments

Comments
 (0)