Skip to content

Get-Help cannot find about topics from Update-Help #18397

Open

Description

Prerequisites

Steps to reproduce

Modules with about topics are unable to be found if the help is delivered via Update-Help.

Update-Help PSReadline
Get-Help about_PSReadline

Expected behavior

Shows about topic

Actual behavior

Get-Help about_PSReadline

Name                              Category  Module                    Synopsis
----                              --------  ------                    --------
Add-History                       Cmdlet    Microsoft.PowerShell.Core Appends entries to the session history.
Clear-History                     Cmdlet    Microsoft.PowerShell.Core Deletes entries from the PowerShell session comm…
Get-History                       Cmdlet    Microsoft.PowerShell.Core Gets a list of the commands entered during the c…
Invoke-History                    Cmdlet    Microsoft.PowerShell.Core Runs commands from the session history.
about_Functions_Argument_Complet… HelpFile
about_History                     HelpFile
about_Line_Editing                HelpFile
about_Pipelines                   HelpFile
about_Tab_Expansion               HelpFile

Error details

N/A

Environment data

$PSVersionTable

Name                           Value
----                           -----
PSVersion                      7.3.0-rc.1
PSEdition                      Core
GitCommitId                    7.3.0-rc.1
OS                             Microsoft Windows 10.0.19044
Platform                       Win32NT
PSCompatibleVersions           {1.0, 2.0, 3.0, 4.0…}
PSRemotingProtocolVersion      2.3
SerializationVersion           1.1.0.1
WSManStackVersion              3.0

Visuals

No response

Activity

  1. StevenBucher98 commented on Oct 31, 2022

    @StevenBucher98
    Collaborator

    This repros in 7.2.6 too, Sean Wheeler (@sdwheeler) and Dongbo Wang (@daxian-dbw) is there something with the about_PSReadLine page that is mis-linked? or is this have to do with Get-Help?

  2. sdwheeler commented on Oct 31, 2022

    @sdwheeler
    Contributor

    This is a bug in Get-Help. On my system I get the following output:

    PS> get-help about_PSReadLine
    
    Name                              Category  Module                    Synopsis
    ----                              --------  ------                    --------
    about_psreadline                  HelpFile
    about_PSReadLine                  HelpFile

    The help system is seeing two files. I believe that one is from Windows PowerShell 5.1 and the other is the current version of help installed for PowerShell 7.x.

  3. sdwheeler commented on Oct 31, 2022

    @sdwheeler
    Contributor

    There are actually 2 different issues here: Thomas's issue and mine.

    I think Thomas's issue is the classic known issue for PSReadLine caused by the change in the spelling (capital L). Also you must use Update-Help -Force to ensure that it downloads any files. See https://devblogs.microsoft.com/powershell/updating-help-for-the-psreadline-module-in-windows-powershell-5-1/ for instructions to fix.

    My issue is that I had two about_PSReadLine files installed on my system and Get-Help only displays the summary view when there is more than one help topic available. This is expected behavior for Get-Help. The question is how did I get two copies of that file? Deleting the old (lowercase) file fixed my problem.

  4. ThomasNieto commented on Oct 31, 2022

    @ThomasNieto
    ContributorAuthor

    Sean Wheeler (@sdwheeler) In my testing this issue isn't limited to PSReadLine, its just the one I chose for the example.

    Here is another example from my module:

    Install-PSResource AnyPackage
    Update-Help AnyPackage -Verbose
    Get-Help about_AnyPackage

    It doesn't return anything however if you copy the en-US folder to the module directory it can find it. It looks Get-Help doesn't search the Help\<module>\<version>\<culture> directory for about topics, it does work for the maml help though.

  5. sdwheeler commented on Oct 31, 2022

    @sdwheeler
    Contributor

    Thomas Nieto (@ThomasNieto) I can't reproduce your issue. Can you provide exact steps with real module names. Be sure to run Update-Help <module> -Force.

  6. ThomasNieto commented on Oct 31, 2022

    @ThomasNieto
    ContributorAuthor

    Sean Wheeler (@sdwheeler) that is the module name, you can run those commands verbatim to reproduce the issue.

  7. sdwheeler commented on Oct 31, 2022

    @sdwheeler
    Contributor

    Thomas Nieto (@ThomasNieto) OK, I can reproduce this problem.

    Aditya Patwardhan (@adityapatwardhan) This is the problem we discussed where help is not found for a module installed in the user scope unless you manually copy the help to the module folder.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    Issue-BugIssue has been identified as a bug in the productNeeds-TriageThe issue is new and needs to be triaged by a work group.WG-Cmdletsgeneral cmdlet issues

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions