Closed buhbuhtig closed 4 years ago
Yeah so Console.WindowWidth can be zero apparent;y I hit this in a continuoous integration environment. Not clear what it should do when that happens.
Your program should test for Console.IsInputRedirected || Console.IsOutputRedirected
. If this is true, the progress bar won't work, so it should not be used.
Since https://github.com/Mpdreamz/shellprogressbar/pull/44 went in I am going to close this issue.
Thanks everyone for reporting this, will dive in again if this remains an issue.
Compiled under Windows:
using (var pg = new ProgressBar(100, "Lalala"))
{for (int i = 0; i < 10; i++)
{Thread.Sleep(500);
//pg.Tick(); <-commented}
} ` dotnet --version 2.1.104Published for Ubuntu 16.04 under Windows: dotnet publish -c release -r ubuntu.16.04-x64
Copied to Ubuntu 16.04