-
Notifications
You must be signed in to change notification settings - Fork 7.6k
Get-help may return multiple instances of the same help file #3410
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
Conversation
32d47f6
to
6f8da8a
Compare
…le if it existed under a culture path and the parent was in the search path as well
|
||
It "Get-Help about_should should return help text and not multiple HelpInfo objects" { | ||
|
||
$help = Get-Help about_should |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Should we use an existing file for the test? Could we create temporary files?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Since the test itself relies on Pester, I think it would be ok to depend on it.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
My thought was that if someone is going to have to improve Help System and to rename this file, the test will fail while has no relationship to the improvements.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
about_should
belongs to Pester so we wouldn't rename it. I can create test only help files to replace this. I agree it would be more clean that way.
@PowerShell/area-helpsystem |
I'll have to debug this on a Mac |
@iSazonov you ready to approve the changes? |
@SteveL-MSFT I cannot repo the Issue locally and don't still understand a root of the Issue. I run the test in PowerShell Core without the fix and the test doesn't fail. 😕 |
@iSazonov did you run on Linux? It doesn't repro on Windows |
Oh, I only test on Windows. Sorry, I do not have the opportunity to build on Unix. |
@SteveL-MSFT: The change LGTM. Thanks Steve for making this change! |
@Francisco-Gamino can you mark |
While building directories to search it may add the default shell directory twice to the list of directories to search (this is more of a perf issue of searching it twice than the root cause of the problem)
When a file is found, it generates a new unique key, however, the unique key is based on the root folder and not the actual one that contains the file, so a duplicate can result.
Addresses #3399