FazBrowse GitHub Viewer | Trending |
URL:
| Home
Tools: [Download Repo ZIP]   [Original HTTPS Page]

Remove the not-working 'run Update-Help from Get-Help when Get-Help runs for the first time' functionality by daxian-dbw · Pull Request #10974 · PowerShell/PowerShell · GitHub

Remove the not-working 'run Update-Help from Get-Help when Get-Help runs for the first time' functionality - #10974

Merged
Aditya Patwardhan (adityapatwardhan) merged 1 commit into
PowerShell:masterfrom
daxian-dbw:Remove-DisablePromptToUpdateHelp
Nov 7, 2019
Merged

Remove the not-working 'run Update-Help from Get-Help when Get-Help runs for the first time' functionality#10974
Aditya Patwardhan (adityapatwardhan) merged 1 commit into
PowerShell:masterfrom
daxian-dbw:Remove-DisablePromptToUpdateHelp

Conversation

Dongbo Wang (daxian-dbw) commented Nov 2, 2019
edited
Loading

Copy link
Copy Markdown
Member

PR Summary

Fix #7452

Background about the setting DisablePromptToUpdateHelp:

In Windows PowerShell, DisablePromptToUpdateHelp is a registry key property set at HKLM\SOFTWARE\Microsoft\PowerShell.
It's not really a setting for user to configure PowerShell, but instead, an implementation detail. It's used by Get-Help to tell if Update-Help has been run yet. On a fresh Windows, DisablePromptToUpdateHelp is not set, so Get-Help running in a admin privilege PowerShell session will prompt user to ask if the user wants to run Update-Help to download help content for all the modules in module path. DisablePromptToUpdateHelp then is set to 1 after the prompt (Update-Help will set it to 1 too), so the code that prompt and run Update-Help in Get-Help is guaranteed to execute only once.

This feature never worked in pwsh, because when moving the registry settings to the powershell.config.json file, 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 to pwsh anymore:

  • for powershell.exe, there is only one instance of PowerShell, so the DisablePromptToUpdateHelp key in registry can guarantee the prompt from Get-Help shows up only once.
  • for pwsh.exe, there can be many instances of PowerShell, and they all depend on their own $PSHOME\powershell.config.json, so even if Update-Help has been run, a new instance of pwsh would still show the prompt when you run Get-Help in it. This is not desirable.

Given the fact that:

  1. this feature never worked in pwsh and there has been no complaint about it;
  2. the feature implementation in Windows PowerShell doesn't work for pwsh

I propose to remove this functionality from pwsh, so as to remove the DisablePromptToUpdateHelp setting from powershell.config.json file (it should never be there as an implementation detail).
If we decide to bring back this functionality to pwsh in future, the implementation definitely needs to be re-written.

PR Checklist

Dongbo Wang (daxian-dbw) changed the title Remove the not-working 'run Update-Help from Get-Help when Get-Help runs for the first time' feature Remove the not-working 'run Update-Help from Get-Help when Get-Help runs for the first time' functionality Nov 4, 2019
Aditya Patwardhan (adityapatwardhan) merged commit 3768be1 into PowerShell:master Nov 7, 2019
Dongbo Wang (daxian-dbw) deleted the Remove-DisablePromptToUpdateHelp branch November 7, 2019 20:11
Ilya (iSazonov) added the CL-CodeCleanup Indicates that a PR should be marked as a Code Cleanup change in the Change Log label Nov 8, 2019
Ilya (iSazonov) added this to the 7.0.0-preview.6 milestone Nov 8, 2019

Copy link
Copy Markdown
Collaborator

Should we set CL-Breaking label? Formally it is a breaking change.

Copy link
Copy Markdown
Member Author

It's not a breaking change to pwsh. The functionality never worked in pwsh.

Copy link
Copy Markdown
Collaborator

How do we mark the difference from Windows PowerShell?

Copy link
Copy Markdown
Member Author

I don't think we have such a label ... There are still codes guarded by #if CORECLR and all those places are essentially differences from Windows PowerShell.
Travis Plunk (@TravisEz13) Aditya Patwardhan (@adityapatwardhan) how do we keep track of the differences between Windows PowerShell and pwsh?

Copy link
Copy Markdown
Member

Dongbo Wang (@daxian-dbw) We don't have a method to track those changes

Copy link
Copy Markdown
Member

I agree this is not breaking.

Copy link
Copy Markdown
Collaborator

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.

Copy link
Copy Markdown
Member

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.

Copy link
Copy Markdown

🎉v7.0.0-preview.6 has been released which incorporates this pull request.:tada:

Handy links:

Thatgfsj (Thatgfsj) pushed a commit to Thatgfsj/PowerShell that referenced this pull request Aug 6, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode characters
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

CL-CodeCleanup Indicates that a PR should be marked as a Code Cleanup change in the Change Log

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Snap and MSIX install of pwsh on Ubuntu does not support Update-Help

4 participants


Back | FazBrowse Home | New Git URL