Skip to content

Commit

Permalink
fix broken percentage format when showing disks in non-interactive mode
Browse files Browse the repository at this point in the history
  • Loading branch information
dundee committed Jan 27, 2021
1 parent 31b544a commit 35fa215
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions stdout/stdout.go
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ func (ui *UI) ListDevices(getter analyze.DevicesInfoGetter) {
var sizeLength, percentLength int
if ui.useColors {
sizeLength = 20
percentLength = 8
percentLength = 16
} else {
sizeLength = 9
percentLength = 5
Expand Down Expand Up @@ -94,7 +94,7 @@ func (ui *UI) ListDevices(getter analyze.DevicesInfoGetter) {
ui.formatSize(device.Size),
ui.formatSize(device.Size-device.Free),
ui.formatSize(device.Free),
ui.red.Sprintf(" %.f%%", usedPercent),
ui.red.Sprintf("%.f%%", usedPercent),
device.MountPoint)
}
}
Expand Down

0 comments on commit 35fa215

Please sign in to comment.