Skip to content

fix(install): use releases api in powershell installer#25

Open
Shengming Liang (LiangShengming) wants to merge 1 commit into
feat/self-update-commandfrom
fix/windows-powershell-latest-clean
Open

fix(install): use releases api in powershell installer#25
Shengming Liang (LiangShengming) wants to merge 1 commit into
feat/self-update-commandfrom
fix/windows-powershell-latest-clean

Conversation

@LiangShengming

@LiangShengming Shengming Liang (LiangShengming) commented Jun 24, 2026

Copy link
Copy Markdown
Collaborator

Pull Request

Summary

What:

Fix the Windows PowerShell installer latest-version lookup by reading tag_name from the GitHub Releases API instead of parsing /releases/latest redirect headers.

Why:

PowerShell 5.1 can misread the typed redirect response headers and fail before downloading the CLI. The API response gives us a stable JSON shape across supported PowerShell versions.

Test Plan

  • git diff --check upstream/feat/self-update-command..HEAD
  • ./scripts/test
  • gh api repos/dedalus-labs/dedalus-cli/releases/latest --jq .tag_name -> v0.4.0
  • GitHub Actions Windows smoke: https://github.com/dedalus-labs/dedalus-cli/actions/runs/28067321724
    • powershell 5.1 (windows-2022) passed with PSVersion 5.1.20348.4294, PSEdition Desktop, installer resolved v0.4.0, installed dedalus.exe, and dedalus.exe --help reported 0.4.0.
    • powershell 5.1 (windows-latest) passed with PSVersion 5.1.26100.32995, PSEdition Desktop, installer resolved v0.4.0, installed dedalus.exe, and dedalus.exe --help reported 0.4.0.

Repro / Showcase

For the installer bug, Get-LatestVersion no longer depends on the PowerShell 5.1 redirect Location header shape. It now calls https://api.github.com/repos/dedalus-labs/dedalus-cli/releases/latest with a User-Agent and reads tag_name from JSON.

Tests Added

  • Unit tests
  • Integration tests
  • E2E tests
  • N/A (no new code paths)

Risk areas:

  • The installer now depends on GitHub's releases API rather than the web redirect endpoint.
  • The unauthenticated API path is rate-limited by GitHub, but normal installer usage should be well below that limit.

@LiangShengming Shengming Liang (LiangShengming) force-pushed the fix/windows-powershell-latest-clean branch from 4633827 to 220407e Compare June 24, 2026 01:02
@LiangShengming Shengming Liang (LiangShengming) changed the base branch from feat/self-update-command to feat/startup-update-prompt June 24, 2026 01:02
@LiangShengming Shengming Liang (LiangShengming) force-pushed the fix/windows-powershell-latest-clean branch from 220407e to e2818da Compare June 24, 2026 01:03
@LiangShengming Shengming Liang (LiangShengming) changed the base branch from feat/startup-update-prompt to feat/self-update-command June 24, 2026 01:03
@LiangShengming

Copy link
Copy Markdown
Collaborator Author

Validation evidence for this PR at commit 4633827:

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