Migrate REST API progress status to use Write-Progress #167
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
When this module was originally written, it used a special feature
of Write-Host in order to re-write the previously written line, in
order to show the user an indeterminate waiting indicator while the
module awaited a response from the server for a REST API request.
Unfortunately, this doesn't work well with all PowerShell hosts
(PowerShell ISE is one notable example). This approach had been taken
originally as it had seemed odd to use Write-Progress (which displays
an absolute progress percentage) for something where we didn't absolutely
know the final duration.
This change migrates the module over to use Write-Progress, and simply
loops through the displayed percentage completed in the same manor that
it loops through and shows an animation.
This method should achieve the same desired goal (letting users know
that something is happening and that they just need to wait a bit
longer) in a more standards-approved way.
Resolves #119