mirror of
https://github.com/balena-io/balena-cli.git
synced 2025-04-24 04:55:44 +00:00
build: Fix "Total: undefined" image pull progress report
Change-type: patch
This commit is contained in:
parent
579d68a8f0
commit
535a443d7c
@ -1493,10 +1493,15 @@ function pullProgressAdapter(outStream: Duplex) {
|
||||
error: Error;
|
||||
errorDetail: Error;
|
||||
}) {
|
||||
if (status != null) {
|
||||
id ||= '';
|
||||
status ||= '';
|
||||
const isTotal = id && id.toLowerCase() === 'total';
|
||||
if (status) {
|
||||
status = status.replace(/^Status: /, '');
|
||||
} else if (isTotal && typeof percentage === 'number') {
|
||||
status = `Pull progress: ${percentage}%`;
|
||||
}
|
||||
if (id != null) {
|
||||
if (id && status && !isTotal) {
|
||||
status = `${id}: ${status}`;
|
||||
}
|
||||
if (percentage === 100) {
|
||||
|
Loading…
x
Reference in New Issue
Block a user