Skip to content

Commit

Permalink
automatic terminal width for progress bar
Browse files Browse the repository at this point in the history
  • Loading branch information
notque committed Jan 23, 2025
1 parent fdcdd42 commit dc47073
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion client/export.go
Original file line number Diff line number Diff line change
Expand Up @@ -160,7 +160,9 @@ Exports can be saved in different formats (json, csv, yaml) for further processi
// Create upload progress bar
uploadBar := pb.Full.Start64(int64(buf.Len()))
uploadBar.Set(pb.Bytes, true)
uploadBar.SetWidth(80)
uploadBar.SetWriter(os.Stderr) // Ensure writing to terminal
uploadBar.Set(pb.Terminal, true) // Enable terminal features
uploadBar.SetWidth(0)
defer uploadBar.Finish()

// Wrap the buffer in a progress reader
Expand Down

0 comments on commit dc47073

Please sign in to comment.