-
Notifications
You must be signed in to change notification settings - Fork 7.1k
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
Fixing issue with help progress #8788
Conversation
…help cmdlet had completed.
603bd67
to
b47d587
Compare
@powercode Love the change! Could you add some tests? Something like the following. Describe "Testing Get-Help Progress" {
It "Last ProgressRecord should be Completed" {
$j = Start-Job { Get-Help DoesNotExist }
$j | Wait-Job
$j.ChildJobs[0].Progress[-1].RecordType | Should -Be ([System.Management.Automation.ProgressRecordType]::Completed)
}} |
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.
LGTM with one style comment.
Reopen to restart all CIs (no response). |
It "Last ProgressRecord should be Completed" { | ||
$j = Start-Job { Get-Help DoesNotExist } | ||
$j | Wait-Job | ||
$j.ChildJobs[0].Progress[-1].RecordType | Should -Be ([System.Management.Automation.ProgressRecordType]::Completed) |
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.
Please add a Remove-Job $j
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.
It should be in try-finally.
@powercode Pushed an empty commit to execute |
The Get-Help cmdlet never calls WriteProgress with a RecordType set to Completed, so the progress is left being rendered even after the Get-Help cmdlet has completed.
The PR is adding a write progress call with recordtype set to Completed.
It also cleans up lots of chains to
this.Context.HelpSystem
by extracting a variable.PR Summary
PR Context
PR Checklist
.h
,.cpp
,.cs
,.ps1
and.psm1
files have the correct copyright headerWIP:
or[ WIP ]
to the beginning of the title (theWIP
bot will keep its status check atPending
while the prefix is present) and remove the prefix when the PR is ready.[feature]
to your commit messages if the change is significant or affects feature tests