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 and Cmdlet.WriteProgress() display 0% complete as 100% complete #15524

Copy link
Copy link
@twest820

Description

@twest820
Issue body actions

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
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 moduleWG-Interactive-Consolethe console experiencethe console experience

    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.