-
Notifications
You must be signed in to change notification settings - Fork 8.1k
Remove the not-working 'run Update-Help from Get-Help when Get-Help runs for the first time' functionality #10974
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Remove the not-working 'run Update-Help from Get-Help when Get-Help runs for the first time' functionality #10974
Conversation
…uns for the first time' feature
|
Should we set CL-Breaking label? Formally it is a breaking change. |
|
It's not a breaking change to |
|
How do we mark the difference from Windows PowerShell? |
|
I don't think we have such a label ... There are still codes guarded by |
|
@daxian-dbw We don't have a method to track those changes |
|
I agree this is not breaking. |
|
My reasoning has always been that when 6.0 version was released, all the differences from Windows PowerShell version was breaking changes (never completely enumerated) and somehow we need to inform users about this. |
|
Then I think that would just be a doc issue. Breaking changes are to draw attention to breaking change in THAT release. 6.0 being long out of support makes not sense to make a breaking change announcement. |
|
🎉 Handy links: |
PR Summary
Fix #7452
Background about the setting
DisablePromptToUpdateHelp:In Windows PowerShell,
DisablePromptToUpdateHelpis a registry key property set atHKLM\SOFTWARE\Microsoft\PowerShell.It's not really a setting for user to configure PowerShell, but instead, an implementation detail. It's used by
Get-Helpto tell ifUpdate-Helphas been run yet. On a fresh Windows,DisablePromptToUpdateHelpis not set, soGet-Helprunning in a admin privilege PowerShell session will prompt user to ask if the user wants to runUpdate-Helpto download help content for all the modules in module path.DisablePromptToUpdateHelpthen is set to1after the prompt (Update-Helpwill set it to1too), so the code that prompt and runUpdate-HelpinGet-Helpis guaranteed to execute only once.This feature never worked in
pwsh, because when moving the registry settings to thepowershell.config.jsonfile,UpdatableHelpSystem.ShouldPromptToUpdateHelp()was not updated correctly to keep the previous behavior. However, that was not a bad thing because the previous behavior in Windows PowerShell is not appropriate topwshanymore:powershell.exe, there is only one instance of PowerShell, so theDisablePromptToUpdateHelpkey in registry can guarantee the prompt fromGet-Helpshows up only once.pwsh.exe, there can be many instances of PowerShell, and they all depend on their own$PSHOME\powershell.config.json, so even ifUpdate-Helphas been run, a new instance ofpwshwould still show the prompt when you runGet-Helpin it. This is not desirable.Given the fact that:
pwshand there has been no complaint about it;pwshI propose to remove this functionality from
pwsh, so as to remove theDisablePromptToUpdateHelpsetting frompowershell.config.jsonfile (it should never be there as an implementation detail).If we decide to bring back this functionality to
pwshin future, the implementation definitely needs to be re-written.PR Checklist
.h,.cpp,.cs,.ps1and.psm1files have the correct copyright headerWIP:or[ WIP ]to the beginning of the title (theWIPbot will keep its status check atPendingwhile the prefix is present) and remove the prefix when the PR is ready.