Skip to content

Write-Progress and Cmdlet.WriteProgress() display 0% complete as 100% complete #15524

@twest820

Description

@twest820

Steps to reproduce

for ($remaining = 3; $remaining -gt 0; $remaining -= 3)
{
    Write-Progress -Activity "Demonstrating 0% complete = 100% complete..." -PercentComplete 0 -SecondsRemaining $remaining
    Start-Sleep -Seconds $remaining
}

Expected behavior

An empty progress bar (black) is displayed as is done by PowerShell 7.1 and earlier. (I'm also a bit surprised this wasn't caught by automated UX tests.)

Actual behavior

The progress bar is yellow all the way across. The black portion of the bar is correctly sized for 1% or more complete in the cases I've spot checked.

Environment data

PSVersion                      7.2.0-preview.6
PSEdition                      Core
GitCommitId                    7.2.0-preview.6
OS                             Microsoft Windows 10.0.19042
Platform                       Win32NT
PSCompatibleVersions           {1.0, 2.0, 3.0, 4.0…}
PSRemotingProtocolVersion      2.3
SerializationVersion           1.1.0.1
WSManStackVersion              3.0

Metadata

Metadata

Assignees

No one assigned

    Labels

    Resolution-FixedThe issue is fixed.Up-for-GrabsUp-for-grabs issues are not high priorities, and may be opportunities for external contributorsWG-Cmdlets-Utilitycmdlets in the Microsoft.PowerShell.Utility moduleWG-Interactive-Consolethe console experience

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions