brillo flash: progress bar when flashing to usb

Currently, when we flash an image to USB, a progress bar (pv) is
only shown if we are in the chroot or if pv is installed on the
host machine.

If brillo flash to usb is run outside the chroot, we enter the
chroot to ensure that a progress bar will be displayed.

TEST=`cros flash usb:// peppy/latest --log-level notice`

Change-Id: If22b0b45fb8f361d57cb79393f85b743a94f5d3d
Reviewed-by: Bertrand Simonnet <>
Commit-Queue: Ralph Nathan <>
Trybot-Ready: Ralph Nathan <>
Tested-by: Ralph Nathan <>
1 file changed