From 17b7b75f4ca85e7926d93349e132223ad3a2e871 Mon Sep 17 00:00:00 2001 From: Aaron Feledy Date: Sat, 3 Jan 2026 15:45:34 -0600 Subject: [PATCH] fix: use Get-Content instead of Invoke-WebRequest for PS 5.1 pipeline test Invoke-WebRequest with file:// URLs throws NullReferenceException in PowerShell 5.1. Use Get-Content -Raw like the PowerShell 7 test does. --- .github/workflows/pr-windows-script-pipeline-tests.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/pr-windows-script-pipeline-tests.yml b/.github/workflows/pr-windows-script-pipeline-tests.yml index 42546513..9454e7bf 100644 --- a/.github/workflows/pr-windows-script-pipeline-tests.yml +++ b/.github/workflows/pr-windows-script-pipeline-tests.yml @@ -35,7 +35,7 @@ jobs: name: Invoke from pipeline with PowerShell 5.1 shell: powershell run: | - Invoke-WebRequest "file://${{ github.workspace }}/dist/setup-lando.ps1" | Invoke-Expression + Get-Content "${{ github.workspace }}/dist/setup-lando.ps1" -Raw | Invoke-Expression Test-Path $env:LOCALAPPDATA\Lando\setup-lando.ps1 lando version --all