[release/v7.4] Fix macOS preview package identifier detection to use version string#26774
Merged
TravisEz13 merged 2 commits intoPowerShell:release/v7.4from Feb 10, 2026
Conversation
…owerShell#26690) Co-authored-by: copilot-swe-agent[bot] <[email protected]> Co-authored-by: TravisEz13 <[email protected]>
Contributor
There was a problem hiding this comment.
Pull request overview
This PR backports the fix for issue #26673 from the main branch (PR #26690) to the release/v7.4 branch. The issue caused macOS preview packages to install to the stable location instead of the preview location, preventing users from having both stable and preview versions installed simultaneously.
Changes:
- Replaced incorrect preview detection logic based on package name with correct version string-based detection
- Centralized package identifier determination in new
Get-MacOSPackageIdentifierInfofunction - Added comprehensive unit tests covering preview, stable, and LTS scenarios
Reviewed changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated no comments.
| File | Description |
|---|---|
| tools/packaging/packaging.psm1 | Fixed preview detection in New-MacOSPackage and New-MacOSLauncher by using new Get-MacOSPackageIdentifierInfo function; inlined simple identifier logic in New-MacOsDistributionPackage; added LTS parameter to New-MacOSPackage |
| test/packaging/packaging.tests.ps1 | Added comprehensive unit tests for Test-IsPreview and Get-MacOSPackageIdentifierInfo functions, including specific test case documenting the bug fix |
jshigetomi
approved these changes
Feb 10, 2026
Member
Author
|
I ran the unit tests |
Member
Author
|
Created #26776 to automatically run the unit tests |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Backport of #26690 to release/v7.4
Triggered by @TravisEz13 on behalf of @app/copilot-swe-agent
Original CL Label: CL-BuildPackaging
/cc @PowerShell/powershell-maintainers
Impact
REQUIRED: Choose either Tooling Impact or Customer Impact (or both). At least one checkbox must be selected.
Tooling Impact
Updates macOS packaging identifier detection so preview packages install to the correct preview location.
Customer Impact
Fixes #26673 where preview packages installed to the stable path; expected preview installs to /usr/local/microsoft/powershell/7-preview.
Regression
REQUIRED: Check exactly one box.
Regression introduced in PR #26268 when native macOS packaging tools replaced fpm.
Testing
Original PR added/updated unit tests in test/packaging/packaging.tests.ps1 covering preview, stable, and LTS scenarios, including the reported bug case.
Risk
REQUIRED: Check exactly one box.
Scoped change to macOS packaging identifier logic with unit test coverage, but it affects install paths for preview packages.