Skip to content

Commit

Permalink
fix: make docker image pull output consistent with docker CLI (#69)
Browse files Browse the repository at this point in the history
  • Loading branch information
agaffney authored Mar 1, 2024
1 parent 9c93511 commit d3a4690
Showing 1 changed file with 7 additions and 18 deletions.
25 changes: 7 additions & 18 deletions pkgmgr/docker.go
Original file line number Diff line number Diff line change
Expand Up @@ -251,24 +251,13 @@ func (d *DockerService) pullImage() error {
if tmpStatus.Id == "" {
d.logger.Info(tmpStatus.Status)
} else {
if strings.HasPrefix(tmpStatus.Status, "Pulling from ") {
// We don't want a space after the colon for the "Pulling from..." lines
d.logger.Info(
fmt.Sprintf(
"%s:%s",
tmpStatus.Status,
tmpStatus.Id,
),
)
} else {
d.logger.Info(
fmt.Sprintf(
"%s: %s",
tmpStatus.Status,
tmpStatus.Id,
),
)
}
d.logger.Info(
fmt.Sprintf(
"%s: %s",
tmpStatus.Id,
tmpStatus.Status,
),
)
}
}
if err := scanner.Err(); err != nil {
Expand Down

0 comments on commit d3a4690

Please sign in to comment.