8000 Get-help may return multiple instances of the same help file by SteveL-MSFT · Pull Request #3410 · PowerShell/PowerShell · GitHub
[go: up one dir, main page]

Skip to content

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

Merged
merged 3 commits into from
Mar 28, 2017

Conversation

SteveL-MSFT
Copy link
Member
@SteveL-MSFT SteveL-MSFT commented Mar 24, 2017

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

…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
Copy link
Collaborator

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?

Copy link
Member Author

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.

Copy link
Collaborator

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.

Copy link
Member Author

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.

@mirichmo
Copy link
Member

@PowerShell/area-helpsystem

@SteveL-MSFT
Copy link
Member Author

I'll have to debug this on a Mac

@SteveL-MSFT
Copy link
Member Author
SteveL-MSFT commented Mar 27, 2017

@iSazonov you ready to approve the changes?

@iSazonov
Copy link
Collaborator

@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. 😕

@SteveL-MSFT
Copy link
Member Author

@iSazonov did you run on Linux? It doesn't repro on Windows

@iSazonov
Copy link
Collaborator

Oh, I only test on Windows. Sorry, I do not have the opportunity to build on Unix.

@Francisco-Gamino
Copy link
Contributor

@SteveL-MSFT: The change LGTM. Thanks Steve for making this change!

@SteveL-MSFT
Copy link
Member Author

@Francisco-Gamino can you mark Approved in the GitHub review tool?

@mirichmo mirichmo merged commit da2fd5c into PowerShell:master Mar 28, 2017
@SteveL-MSFT SteveL-MSFT deleted the help branch June 28, 2017 21:18
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants
0