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 drops updates if the calls happen too quickly in succession #18848

Copy link
Copy link
@mklement0

Description

@mklement0
Issue body actions

Prerequisites

Steps to reproduce

Note: This is a regression from Windows PowerShell and affects both the Minimal and Classic views (selectable via $PSStyle.Progress.View)

$arr = 1..10
$arr | 
  ForEach-Object { 
    [int] $percentComplete = ($_ / $arr.Count) * 100
    Write-Progress -Activity Test -Status "$percentComplete% complete" -PercentComplete $percentComplete
    # !! Without sleeping for a while, the progress display stops updating after the FIRST call.
    # Start-Sleep -Milliseconds 200
  }
Start-Sleep 5 # Ensure that the progress bar stays visible for a while.

Expected behavior

The progress bar should show 100% and stay visible for 5 seconds.

Actual behavior

The progress bar shows 10% - that is, only the first call took effect.

Error details

No response

Environment data

PowerShell Core 7.3.1

Visuals

No response

Reactions are currently unavailable

Metadata

Metadata

Assignees

No one assigned

    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.