Skip to content

fix: use Get-Content instead of Invoke-WebRequest for PS 5.1 pipeline test - #112

Closed
AaronFeledy wants to merge 1 commit into
mainfrom
fix/powershell-5.1-pipeline-test
Closed

fix: use Get-Content instead of Invoke-WebRequest for PS 5.1 pipeline test#112
AaronFeledy wants to merge 1 commit into
mainfrom
fix/powershell-5.1-pipeline-test

Conversation

@AaronFeledy

@AaronFeledy AaronFeledy commented Jan 3, 2026

Copy link
Copy Markdown
Member

Summary

  • Fixes PowerShell 5.1 pipeline test failure caused by Invoke-WebRequest with file:// URLs throwing NullReferenceException
  • Uses Get-Content -Raw instead, matching the PowerShell 7 test approach

Root Cause

Invoke-WebRequest in PowerShell 5.1 does not properly handle file:// protocol URLs, resulting in:

Invoke-WebRequest : Object reference not set to an instance of an object.

Fixes the CI failure seen in PR #111: https://github.com/lando/setup-lando/actions/runs/20683213314/job/59380355221


Note

Updates the Windows workflow to avoid a PS 5.1 failure when invoking a local script via file://.

  • In .github/workflows/pr-windows-script-pipeline-tests.yml, replace Invoke-WebRequest "file://.../setup-lando.ps1" | Invoke-Expression with Get-Content -Raw | Invoke-Expression for the PowerShell 5.1 step
  • Aligns PS 5.1 step with the existing PowerShell 7 (pwsh) approach; verification (Test-Path, lando version --all) unchanged

Written by Cursor Bugbot for commit 17b7b75. This will update automatically on new commits. Configure here.

… test

Invoke-WebRequest with file:// URLs throws NullReferenceException in
PowerShell 5.1. Use Get-Content -Raw like the PowerShell 7 test does.
@netlify

netlify Bot commented Jan 3, 2026

Copy link
Copy Markdown

Deploy Preview for get-lando canceled.

Name Link
🔨 Latest commit 17b7b75
🔍 Latest deploy log https://app.netlify.com/projects/get-lando/deploys/69598e159291590008a0b1a2

@netlify

netlify Bot commented Jan 3, 2026

Copy link
Copy Markdown

Deploy Preview for setup-lando ready!

Name Link
🔨 Latest commit 17b7b75
🔍 Latest deploy log https://app.netlify.com/projects/setup-lando/deploys/69598e155d489b0008e929d2
😎 Deploy Preview https://deploy-preview-112--setup-lando.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.
Lighthouse
Lighthouse
1 paths audited
Performance: 61 (🟢 up 2 from production)
Accessibility: 98 (no change from production)
Best Practices: 100 (no change from production)
SEO: 100 (no change from production)
PWA: -
View the detailed breakdown and full score reports

To edit notification comments on pull requests, go to your Netlify project configuration.

@AaronFeledy AaronFeledy closed this Jan 3, 2026
@AaronFeledy
AaronFeledy deleted the fix/powershell-5.1-pipeline-test branch January 3, 2026 22:31
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant