Repository navigation
Remove the Update Notification feature from PowerShell - #28242
Dongbo Wang (daxian-dbw) merged 1 commit into
Conversation
|
Azure Pipelines: There may be pipelines that require an authorized user to comment /azp run to run. |
There was a problem hiding this comment.
🟢 Approval recommended
The removal is self-contained, preserves startup-banner assertions, and has no identified blocking issues.
No open issues 🎉
What changed in this PR
Removes PowerShell’s in-product update notifications, eliminating the startup crash path described in #28131 and associated background processing.
Changes:
- Remove release checks, notification display, and cache-management implementation.
- Remove default notification strings; localized cleanup is deferred to the Localization Pipeline.
- Remove obsolete update-check environment setup from startup-banner tests.
| File | Description |
|---|---|
| test/powershell/Host/ConsoleHost.Tests.ps1 | Remove obsolete environment setup and restoration. |
| src/Microsoft.PowerShell.ConsoleHost/resources/ManagedEntranceStrings.resx | Remove default notification strings. |
| src/Microsoft.PowerShell.ConsoleHost/host/msh/UpdatesNotification.cs | Delete the notification implementation. |
| src/Microsoft.PowerShell.ConsoleHost/host/msh/ConsoleHost.cs | Remove background update-check startup. |
| src/Microsoft.PowerShell.ConsoleHost/host/msh/CommandLineParameterParser.cs | Remove notification display from the banner. |
Review effort: Balanced
02e9e0c
into
PowerShell:master
|
How will Linux installs that used tar.gz files be notified about an update being available ? Seems like that use case was forgotten.... |
|
This PR closes this following discussion Joe S (@JoeSalmeri) - Put simply they won't be notified & users that are using that install method will need to look to implement their own update check & install logic. My feeling is that the team felt if users are using that method for install on linux or MacOS or zip installs on Windows then they should already be capable of managing their own update check & install process. Which can be done in a few lines of PowerShell easily enough via calling either
|
|
Ryan Yates (@kilasuit) - That seems like a leap to assume a typical user that downloaded a software package from Install PowerShell 7 on macOS once is ever going to go back and check it again manually. It isn't like there haven't been significant CVE's that have needed patching recently that put Linux and macOS users at risk. Feels like the 'security is a priority' focus went out the window with this decision. |
I already wrote a pwsh script to install a specific version pwsh version and I already check the releases website periodically to check for updates and read about changes, but the notification was also a reminder for me to check. Thanks for the example script to check for update, I appreciate it. |
I agree, seems like a bad decision but at least there is a way we can restore the functionality with a few lines of code. |
|
This is a poor decision. Since I don't manage PowerShell through the Microsoft Store, I have no way of knowing if a patch is needed without the update notification. I don't understand why a perfectly normal function is being removed over a culture issue. |
PR Summary
Fix #28131
Remove the Update Notification feature from PowerShell.
PowerShell servicing delivery through Microsoft Update has become increasingly mature and reliable, while PowerShell installed as an MSIX app can update automatically through the Microsoft Store. As these update mechanisms have improved, the in-product Update Notification provides increasingly limited additional value.
Removing the feature also eliminates its background network request, local cache and synchronization logic, startup notification, and associated maintenance overhead.
Changes
UpdatesNotificationimplementation and its cache-management logic.POWERSHELL_UPDATECHECKsetup from the startup banner tests.PR Checklist
.h,.cpp,.cs,.ps1and.psm1files have the correct copyright header