I am using Shake, calling wget to download a file. If I do that on the command line I see a one-line progress bar, but when called from Shake I see many lines of dots. As an example:
shake shakeOptions $
action
(cmd "wget http://hackage.haskell.org/packages/index.tar.gz" :: Action ())
I would like that to show the one-line progress bar.
The solution is:
There are two things going on here:
1)
wgetdetects that it isn't sending direct to the console (sincecmdcaptures output using pipes), and turns off the progress bar. Withwget, you can turn that back on with--progress=bar:force.2) Once I've done that, the progress bar doesn't actually display, because Shake turns on line buffering by default (it helps commands run in parallel show less interleaved output) and a progress bar only updates within one line. You can fix that by setting the option
shakeLineBuffering=False.