Get-help may return multiple instances of the same help file#3410
Get-help may return multiple instances of the same help file#3410mirichmo merged 3 commits intoPowerShell:masterfrom
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.
Should we use an existing file for the test? Could we create temporary files?
There was a problem hiding this comment.
Since the test itself relies on Pester, I think it would be ok to depend on it.
There was a problem hiding this comment.
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.
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