Skip to content

[release/v7.5] Update the Update-Help tests to use -Force to remove read-only files#26788

Merged
daxian-dbw merged 1 commit intoPowerShell:release/v7.5from
TravisEz13:backport/release/v7.5/26780-2e26e4b69
Feb 12, 2026
Merged

[release/v7.5] Update the Update-Help tests to use -Force to remove read-only files#26788
daxian-dbw merged 1 commit intoPowerShell:release/v7.5from
TravisEz13:backport/release/v7.5/26780-2e26e4b69

Conversation

@TravisEz13
Copy link
Member

Backport of #26780 to release/v7.5

Triggered by @TravisEz13 on behalf of @daxian-dbw

Original CL Label: CL-Test

/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)

This fixes CI test infrastructure failures caused by inability to remove read-only files in help content folders during test cleanup. Without this fix, Update-Help tests produce numerous non-terminating errors that clutter test output and could mask real test failures.

Customer Impact

  • Customer reported
  • Found internally

Regression

REQUIRED: Check exactly one box.

  • Yes
  • No

This is not a regression.

Testing

The fix modifies test cleanup code to use -Force parameter when removing help content directories. This allows tests to remove read-only files that were previously causing non-terminating errors. The tests themselves verify the Update-Help cmdlet functionality works correctly after cleanup.

Risk

REQUIRED: Check exactly one box.

  • High
  • Medium
  • Low

Low risk as this only modifies test code, not production code. The change improves test reliability by properly cleaning up read-only files during test execution. No impact to end users or runtime behavior.

Copilot AI review requested due to automatic review settings February 12, 2026 17:08
@TravisEz13 TravisEz13 added the CL-Test Indicates that a PR should be marked as a test change in the Change Log label Feb 12, 2026
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

Backports a test-infrastructure fix to the release/v7.5 branch to reduce noise and failures in Update-Help Pester tests by improving cleanup of help content directories that may contain read-only files.

Changes:

  • Updates the Update-Help test cleanup step to remove help directories recursively with -Force.
  • Suppresses cleanup errors during removal by adding -ErrorAction SilentlyContinue.

@daxian-dbw daxian-dbw merged commit 7979a4b into PowerShell:release/v7.5 Feb 12, 2026
38 of 40 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

CL-Test Indicates that a PR should be marked as a test change in the Change Log

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants