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 — [release/v7.5.12] Tolerate IO/JSON errors reading the per-user `powershell.config.json` by adityapatwardhan · Pull Request #28070 · PowerShell/PowerShell

Conversation

@adityapatwardhan

@adityapatwardhan Aditya Patwardhan (adityapatwardhan) commented Sep 23, 2026

Copy link
Copy Markdown
Member

Backport of #27373 to release/v7.5.12

Triggered by Aditya Patwardhan (@adityapatwardhan) on behalf of Justin Chung (@jshigetomi)

Original CL Label: CL-Engine

/cc @PowerShell/powershell-maintainers

Impact

REQUIRED: Choose either Tooling Impact or Customer Impact (or both). At least one checkbox must be selected.

Tooling Impact

  • Required tooling change
  • Optional tooling change (include reasoning)

Customer Impact

  • Customer reported
  • Found internally

Found internally after reports of PowerShell failing at startup when a per-user powershell.config.json is temporarily unreadable or malformed. The expected behavior is to warn and fall back to defaults for the current-user file while retaining strict failure for the system-wide configuration.

Regression

REQUIRED: Check exactly one box.

  • Yes
  • No

This is not a regression.

Testing

The original PR adds focused xUnit coverage for broken and type-mismatched current-user configuration, fallback defaults, warning emission, and continued system-wide strict failure. The backport cherry-picked cleanly and passes git diff --check, resource XML parsing, and conflict-marker scanning. A targeted dotnet test attempt was blocked during build by pre-existing missing DotNetEventingStrings generated resources in Microsoft.PowerShell.CoreCLR.Eventing, before the selected tests could run.

Risk

REQUIRED: Check exactly one box.

  • High
  • Medium
  • Low

Medium risk because this changes early startup configuration error handling, but only for the per-user scope; the system-wide security-relevant configuration remains fail-closed. The original change includes focused xUnit coverage and cherry-picked cleanly.

Sorry, something went wrong.

Uh oh!

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

All reactions
@jshigetomi Justin Chung
@adityapatwardhan
Tolerate IO/JSON errors reading the per-user powershell.config.json (…
b7b0ffd
…PowerShell#27373)

Co-authored-by: Justin Chung <[email protected]>
Co-authored-by: Copilot <[email protected]>
Copilot AI lite review requested due to automatic review settings September 23, 2026 18:12
@adityapatwardhan Aditya Patwardhan (adityapatwardhan) added the CL-Engine Indicates that a PR should be marked as an engine change in the Change Log label Sep 23, 2026
@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 Aditya Patwardhan (adityapatwardhan) September 23, 2026 18:13
View session
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

🟡 Changes recommended

Inaccessible files can be treated as missing, bypassing warnings and strict system-wide failure.

Get a fresh assessment by requesting another Copilot review.

Review effort: Lite
Findings: 1 High severity

Open (1)
  • High severity Treat inaccessible configuration files as errors, not missing · New
What changed in this PR

Backports tolerant handling for malformed or unreadable per-user PowerShell configuration while retaining strict system-wide behavior.

Changes:

  • Adds per-user fallback warnings for IO and JSON errors.
  • Adds localized warning resources.
  • Adds focused fallback and warning tests.
File Summary
test/​xUnit/​csharp/​test_PSConfiguration.cs Tests fallback and warning behavior.
src/​System.Management.Automation/​resources/​PSConfigurationStrings.resx Adds warning messages.
src/​System.Management.Automation/​engine/​PSConfiguration.cs Implements configuration fallback handling.

💡 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
Comment thread src/System.Management.Automation/engine/PSConfiguration.cs
Comment on lines +415 to +417
catch (Exception exc) when (
scope == ConfigScope.CurrentUser &&
(exc is IOException || exc is UnauthorizedAccessException || exc is SecurityException || exc is JsonException))
daxian-dbw
Dongbo Wang (daxian-dbw) approved these changes Sep 23, 2026
View reviewed changes
jshigetomi
Justin Chung (jshigetomi) approved these changes Sep 23, 2026
View reviewed changes
@adityapatwardhan
Aditya Patwardhan (adityapatwardhan) merged commit 8a32d84 into PowerShell:release/v7.5.12 Sep 23, 2026
36 checks passed

Uh oh!

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

@adityapatwardhan
Aditya Patwardhan (adityapatwardhan) deleted the backport/release/v7.5.12/27373-84a930151 branch September 23, 2026 21:03
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Reviewers

Copilot code review Copilot
Copilot review effort
Applies to this pull request for everyone.Learn more about Copilot code review.
Copilot left review comments
@daxian-dbw Dongbo Wang (daxian-dbw) daxian-dbw approved these changes
@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

CL-Engine Indicates that a PR should be marked as an engine 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

@adityapatwardhan @daxian-dbw @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.