Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 6 additions & 1 deletion cmd/display/tty.go
Original file line number Diff line number Diff line change
Expand Up @@ -347,7 +347,12 @@ func (w *ttyWriter) lineText(t *task, pad string, terminalWidth, statusPadding i
}
total += child.total
current += child.current
completion = append(completion, percentChars[(len(percentChars)-1)*child.percent/100])
r := len(percentChars) - 1
p := child.percent
if p > 100 {
p = 100
}
completion = append(completion, percentChars[r*p/100])
}
}

Expand Down
3 changes: 3 additions & 0 deletions pkg/compose/pull.go
Original file line number Diff line number Diff line change
Expand Up @@ -416,6 +416,9 @@ func toPullProgressEvent(parent string, jm jsonmessage.JSONMessage, events api.E
total = jm.Progress.Total
if jm.Progress.Total > 0 {
percent = int(jm.Progress.Current * 100 / jm.Progress.Total)
if percent > 100 {
percent = 100
}
}
}
case DownloadCompletePhase, AlreadyExistsPhase, PullCompletePhase:
Expand Down
3 changes: 3 additions & 0 deletions pkg/compose/push.go
Original file line number Diff line number Diff line change
Expand Up @@ -155,6 +155,9 @@ func toPushProgressEvent(prefix string, jm jsonmessage.JSONMessage, events api.E
total = jm.Progress.Total
if jm.Progress.Total > 0 {
percent = int(jm.Progress.Current * 100 / jm.Progress.Total)
if percent > 100 {
percent = 100
}
}
}
}
Expand Down