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

Write-Progress -Completed requires an -Activity argument, even though it is pointless #15252

Copy link
Copy link
@mklement0

Description

@mklement0
Issue body actions

To hide a progress bar explicitly, you call Write-Progress -Completed

Doing so currently requires that an -Activity argument be passed as well, even though that shouldn't be necessary, given that such an argument is only relevant for displaying the progress bar, not when hiding it.

Therefore, Write-Progress -Completed by itself should be sufficient to hide a progress bar (potentially combined with -Id to disambiguate, should multiple ones have been created).

Steps to reproduce

foreach ($i in 1..10) { Write-Progress $i -Activity foo; start-sleep -ms 100 }
Write-Progress -Completed
'Done'

Expected behavior

The progress bar should display, then disappear, followed by output 'Done'.

Actual behavior

Write-Progress -Completed unexpectedly prompts for an -Activity parameter value.

Environment data

PowerShell Core 7.2.0-preview.5
Reactions are currently unavailable

Metadata

Metadata

Assignees

No one assigned

    Labels

    Resolution-FixedThe issue is fixed.The issue is fixed.Up-for-GrabsUp-for-grabs issues are not high priorities, and may be opportunities for external contributorsUp-for-grabs issues are not high priorities, and may be opportunities for external contributorsWG-Cmdlets-Utilitycmdlets in the Microsoft.PowerShell.Utility modulecmdlets in the Microsoft.PowerShell.Utility module

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions

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