GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — Fix the PATH test for MSIX installed PowerShell by daxian-dbw · Pull Request #28068 · PowerShell/PowerShell

Conversation

@daxian-dbw

@daxian-dbw Dongbo Wang (daxian-dbw) commented Sep 23, 2026

Copy link
Copy Markdown
Member

PR Summary

Fix the PATH test for MSIX installed PowerShell, which uses the stable path to its execution alias instead of $PSHOME.

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
@daxian-dbw
Fix the PATH test for MSIX installed PowerShell
e8f3379
Copilot AI lite review requested due to automatic review settings September 23, 2026 17:29
@daxian-dbw
Dongbo Wang (daxian-dbw) requested a review from a team as a code owner September 23, 2026 17:29
@azure-pipelines

azure-pipelines Bot commented Sep 23, 2026

Copy link
Copy Markdown
Azure Pipelines:
There may be pipelines that require an authorized user to comment /azp run to run.
All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

Copilot started reviewing on behalf of Dongbo Wang (daxian-dbw) September 23, 2026 17:30
View session
@daxian-dbw Dongbo Wang (daxian-dbw) added the CL-Test Indicates that a PR should be marked as a test change in the Change Log label Sep 23, 2026
Copilot AI reviewed Sep 23, 2026
View reviewed changes

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

There was a problem hiding this comment.

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot review overview

🔵 Needs a closer look

MSIX path derivation is unreliable for prerelease package paths and SemanticVersion fields.

Review effort: Lite
Findings: None

What changed in this PR

Updates the PATH startup test for MSIX-installed PowerShell, which uses a stable execution-alias path.

Changes:

  • Detects MSIX installations.
  • Derives the expected stable alias path.
  • Updates PATH assertions.
File Description
test/​powershell/​Host/​ConsoleHost.Tests.ps1 Adjusts PATH expectations for MSIX-installed PowerShell.

💡 Add a code-review agent skill for context-aware, tailored reviews. Learn more in the docs.

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
iSazonov
Ilya (iSazonov) reviewed Sep 24, 2026
View reviewed changes
Comment thread test/powershell/Host/ConsoleHost.Tests.ps1
$path | Should -BeExactly ($PSHOME + [System.IO.Path]::PathSeparator)

$ExpectedPath = $PSHOME
if ($PSHOME.StartsWith("$env:ProgramFiles\WindowsApps\Microsoft.PowerShell")) {

@iSazonov Ilya (iSazonov) Sep 24, 2026

Copy link
Copy Markdown
Collaborator

There was a problem hiding this comment.

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The test name is "pwsh starts even if PATH is not defined" - is this only we should test? If so, we can simply return and check any other value.

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions

@daxian-dbw Dongbo Wang (daxian-dbw) Sep 24, 2026

Copy link
Copy Markdown
Member Author

There was a problem hiding this comment.

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm not sure I understand what you meant. This test is to validate if PowerShell can add exe path to PATH when the PATH env var doesn't exist.

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions

@iSazonov Ilya (iSazonov) Sep 25, 2026

Copy link
Copy Markdown
Collaborator

There was a problem hiding this comment.

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The name of this test only says that pwsh is running successfully in the absence of a PATH. If you want to check exactly the PATH value that pwsh creates, then name the test accordingly.

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions

@daxian-dbw Dongbo Wang (daxian-dbw) Sep 25, 2026

Copy link
Copy Markdown
Member Author

There was a problem hiding this comment.

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Gotcha. I updated the test name.

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
daxian-dbw
Dongbo Wang (daxian-dbw) commented Sep 25, 2026
View reviewed changes
Comment thread test/powershell/Host/ConsoleHost.Tests.ps1 Resolved

Uh oh!

There was an error while loading. Please reload this page.

@daxian-dbw
Apply suggestion from @daxian-dbw
a1636f6
@daxian-dbw Dongbo Wang (daxian-dbw) added Backport-7.4.x-Approved Backport-7.5.x-Approved Backport-7.6.x-Approved and removed Backport-7.4.x-Approved Backport-7.5.x-Approved labels Sep 25, 2026
jshigetomi
Justin Chung (jshigetomi) approved these changes Sep 25, 2026
View reviewed changes
@daxian-dbw
Dongbo Wang (daxian-dbw) merged commit 5f9fcdd into PowerShell:master Sep 25, 2026
40 checks passed

Uh oh!

There was an error while loading. Please reload this page.

@daxian-dbw
Dongbo Wang (daxian-dbw) deleted the test-fix branch September 25, 2026 18:04
@daxian-dbw Dongbo Wang (daxian-dbw) mentioned this pull request Sep 25, 2026
[release/v7.6.7] Fix the PATH test for MSIX installed PowerShell #28108
Merged
3 of 9 tasks
@daxian-dbw Dongbo Wang (daxian-dbw) added Backport-7.6.x-Migrated Backport-7.6.x-Done and removed Backport-7.6.x-Approved Backport-7.6.x-Migrated labels Sep 25, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Reviewers

@iSazonov Ilya (iSazonov) iSazonov left review comments
Copilot code review Copilot
Copilot review effort
Applies to this pull request for everyone.Learn more about Copilot code review.
Copilot left review comments
@jshigetomi Justin Chung (jshigetomi) jshigetomi approved these changes

Uh oh!

There was an error while loading. Please reload this page.

Assignees

No one assigned

Labels

Backport-7.6.x-Done CL-Test Indicates that a PR should be marked as a test change in the Change Log

Projects

None yet

Milestone

No milestone

Development

Successfully merging this pull request may close these issues.

Uh oh!

There was an error while loading. Please reload this page.

4 participants

@daxian-dbw @iSazonov @jshigetomi
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.
You are visitor 01402503 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.