Skip to content

fix(install): qualify Windows archive extraction - #652

Open
codywilliamson wants to merge 1 commit into
slackapi:mainfrom
codywilliamson:codex/fix-windows-expand-archive
Open

fix(install): qualify Windows archive extraction#652
codywilliamson wants to merge 1 commit into
slackapi:mainfrom
codywilliamson:codex/fix-windows-expand-archive

Conversation

@codywilliamson

Copy link
Copy Markdown

Changelog

The Windows installer now extracts the CLI reliably when another PowerShell module defines Expand-Archive.

Summary

PowerShell resolves an unqualified command name before binding its parameters. When Pscx 3.3.2 is loaded, the installer selects Pscx's Expand-Archive, which does not accept -DestinationPath; the ZIP downloads successfully, but extraction and the PATH update never happen. Both release and development installers now address Microsoft.PowerShell.Archive explicitly.

Fixes #651.

The regression test is the part worth the closest review. It keeps the change dependency-free: it parses both mirrored installers to require the qualified command, then performs a real extraction while a same-named function shadows unqualified command resolution.

Testing

pwsh -NoProfile -File ./scripts/install-windows-test.ps1
powershell.exe -NoProfile -NonInteractive -ExecutionPolicy Bypass -File ./scripts/install-windows-test.ps1

Both commands pass locally. go test ./... was also attempted with the repository-requested Go 1.26.6 toolchain on Windows/386, but unrelated command packages simultaneously reached the suite's 11-minute watchdog. The pull request's macOS Go suite remains the authoritative repository-wide check.

Notes

The CLI runtime and non-Windows installers are unchanged. The added Windows job runs only the focused, Pester-free installer regression.

Requirements

Use the Microsoft.PowerShell.Archive cmdlet explicitly so modules such as Pscx cannot shadow the installer extraction command. Add a focused Windows regression test for both installer variants.\n\nFixes slackapi#651.
@codywilliamson
codywilliamson requested a review from a team as a code owner August 27, 2026 21:02
@salesforce-cla salesforce-cla Bot added the cla:missing The CLA was not signed label Aug 27, 2026
@salesforce-cla

Copy link
Copy Markdown

Thanks for the contribution! Before we can merge this, we need @codywilliamson to sign the Salesforce Inc. Contributor License Agreement.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

cla:missing The CLA was not signed

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Windows installer fails when Pscx shadows Expand-Archive

1 participant