More legible output when downloading files from a provision shell script?

331 views
Skip to first unread message

Donald Burr

unread,
Jul 11, 2015, 12:59:37 AM7/11/15
to vagra...@googlegroups.com
I use shell provisioning scripts in a lot of my Vagrant environments to automate the configuration of build/test tools, etc. Most of these download software from external sources using curl or wget (I've tried both.) These tools display a progress indicator (very useful to have, especially since some of the files I'm downloading are fairly large, plus my network connection is sometimes sluggish/flaky.) However Vagrant really does not display these progress indicators very well at all, resulting in screens full of garbage such as the following:

==> default: #
==> default: #########
############                                                              16.7%
############                                                              16.7%
==> default: #
==> default: #
==> default: #
==> default: #
==> default: #
==> default: #
==> default: #
==> default: #
==> default: #
==> default: #
==> default: #
==> default: #
==> default:
==> default:
==> default:
############                                                              16.8%
This causes a great deal of spew and could result in legitimate/important messages (e.g. warning/error messages) scrolling off the screen. At first I thought this weirdness was because of the fancy cursor tricks that curl/wget uses to draw the progress bar; however I even tried wget's "--progress=dot" which is pretty plain, it just prints out rows of dots, with no backspacing or other fancy cursor tricks, but even this caused unusual output when run in a vagrant provision script. The only way I've found of getting clean output is if I use curl/wget's quiet/non-verbose mode, which of course turns off all output, but then I don't have any idea whatsoever of what the download's current progress is. Is there any way that Vagrant can be configured to display this type of output correctly? Or, alternatively, is there another command-line download tool whose status output works better with Vagrant? Thanks!

Ilyá Belsky

unread,
Aug 10, 2015, 5:46:20 PM8/10/15
to Vagrant
Hi Donald,
I have the same issue. Did you managed it?
Reply all
Reply to author
Forward
0 new messages