Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Get-help may return multiple instances of the same help file#3410

Merged
mirichmo merged 3 commits into
PowerShell:masterPowerShell/PowerShell:masterfrom
SteveL-MSFT:helpSteveL-MSFT/PowerShell:helpCopy head branch name to clipboard
Mar 28, 2017
Merged

Get-help may return multiple instances of the same help file#3410
mirichmo merged 3 commits into
PowerShell:masterPowerShell/PowerShell:masterfrom
SteveL-MSFT:helpSteveL-MSFT/PowerShell:helpCopy head branch name to clipboard

Conversation

@SteveL-MSFT

@SteveL-MSFT SteveL-MSFT commented Mar 24, 2017

Copy link
Copy Markdown
Member

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
Copy Markdown
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
Copy Markdown
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
Copy Markdown
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
Copy Markdown
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
Copy Markdown
Member

@PowerShell/area-helpsystem

@SteveL-MSFT

Copy link
Copy Markdown
Member Author

I'll have to debug this on a Mac

@SteveL-MSFT

SteveL-MSFT commented Mar 27, 2017

Copy link
Copy Markdown
Member Author

@iSazonov you ready to approve the changes?

@iSazonov

Copy link
Copy Markdown
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
Copy Markdown
Member Author

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

@iSazonov

Copy link
Copy Markdown
Collaborator

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

@Francisco-Gamino

Copy link
Copy Markdown
Contributor

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

@SteveL-MSFT

Copy link
Copy Markdown
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

Morty Proxy This is a proxified and sanitized view of the page, visit original site.