mirror of
https://github.com/privatevoid-net/nix-super.git
synced 2024-11-26 15:56:18 +02:00
Merge pull request #3203 from hvdijk/prefetch-progress
Fix progress bar when nix-prefetch-url is piped.
This commit is contained in:
commit
8ec1b1e7b8
2 changed files with 2 additions and 2 deletions
|
@ -1467,7 +1467,7 @@ static Sync<std::pair<unsigned short, unsigned short>> windowSize{{0, 0}};
|
|||
static void updateWindowSize()
|
||||
{
|
||||
struct winsize ws;
|
||||
if (ioctl(1, TIOCGWINSZ, &ws) == 0) {
|
||||
if (ioctl(2, TIOCGWINSZ, &ws) == 0) {
|
||||
auto windowSize_(windowSize.lock());
|
||||
windowSize_->first = ws.ws_row;
|
||||
windowSize_->second = ws.ws_col;
|
||||
|
|
|
@ -341,7 +341,7 @@ public:
|
|||
}
|
||||
|
||||
auto width = getWindowSize().second;
|
||||
if (width <= 0) std::numeric_limits<decltype(width)>::max();
|
||||
if (width <= 0) width = std::numeric_limits<decltype(width)>::max();
|
||||
|
||||
writeToStderr("\r" + filterANSIEscapes(line, false, width) + "\e[K");
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue