1
0
Fork 0
mirror of https://github.com/Luzifer/share.git synced 2024-12-20 10:31:16 +00:00

Put progress bar on Stderr

in order to have the URL output pipeable

Signed-off-by: Knut Ahlers <knut@ahlers.me>
This commit is contained in:
Knut Ahlers 2022-12-12 15:44:37 +01:00
parent 982edcf1e2
commit f2e3eebbac
Signed by: luzifer
GPG key ID: D91C3E91E4CAD6F5

View file

@ -9,6 +9,7 @@ import (
"io"
"io/ioutil"
"mime"
"os"
"path"
"strings"
"time"
@ -73,6 +74,7 @@ func executeUpload(inFileName string, inFileHandle io.ReadSeeker, useCalculatedF
if cfg.Progress {
bar := pb.New64(ps.Size).Prefix(inFileName).SetUnits(pb.U_BYTES)
bar.Output = os.Stderr
bar.Start()
barUpdate := true