Skip to content

Handle PowerShell RC versions in preview install path#1608

Draft
Copilot wants to merge 3 commits intomainfrom
copilot/68332183594-fix-github-actions-workflow
Draft

Handle PowerShell RC versions in preview install path#1608
Copilot wants to merge 3 commits intomainfrom
copilot/68332183594-fix-github-actions-workflow

Conversation

Copy link
Contributor

Copilot AI commented Mar 25, 2026

Summary

Microsoft's preview redirect (aka.ms/powershell-release?tag=preview) now resolves to RC versions (e.g., 7.6.0-rc.1) instead of -preview.X versions. The install script only checked for the string "preview" in version routing, so RC versions fell through to the apt/dnf codepath (which doesn't carry them) and then failed again in the GitHub fallback's stable version resolver.

Fixes the failing test-scenarios (powershell) CI job (job link).

Changes

src/powershell/install.sh

  • Version routing: Add != *"-rc."* guards alongside existing != *"preview"* checks so RC versions skip apt/dnf and go straight to GitHub release download
  • GitHub fallback: Route *"-rc."* versions through find_preview_version_from_git_tags instead of the stable-only find_version_from_git_tags
  • Tag matching: Broaden regex from -preview\.[0-9]+ to -(preview|rc)\.[0-9]+ so RC tags are discoverable
  • Typo fix: googlegit_cmd_namegit_cmd_name

test/powershell/powershell_preview_version*.sh

  • Update version assertion from grep -i 'preview' to grep -iE 'preview|rc\.[0-9]+' since pwsh --version reports PowerShell 7.6.0-rc.1 for RC builds

- Add -rc. version checks alongside preview checks in routing conditions
  so RC versions go directly to GitHub install instead of apt/dnf
- Update find_preview_version_from_git_tags() to match -rc.X git tags
- Fix typo googlegit_cmd_name -> git_cmd_name
- Update preview test scripts to match both preview and rc.X patterns

Co-authored-by: Kaniska244 <186041440+Kaniska244@users.noreply.github.com>
Agent-Logs-Url: https://github.com/devcontainers/features/sessions/03fd0565-a230-4bd9-80f7-92b8ce74a1bb
@Kaniska244
Copy link
Contributor

@copilot Pls do a version bump.

Co-authored-by: Kaniska244 <186041440+Kaniska244@users.noreply.github.com>
Agent-Logs-Url: https://github.com/devcontainers/features/sessions/98f1f7bd-4d93-4641-85d8-287b218c1eb8
Copy link
Contributor Author

Copilot AI commented Mar 25, 2026

@copilot Pls do a version bump.

Done — bumped powershell feature version from 2.0.12.0.2 in 980e9f0.

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.

2 participants