mirror of https://github.com/docker/cli.git
Ensure proper value is used when computing reclaimable space
When Size was reverted to be equal to VirtualSize, the df command formatter was not correctly updated to account for the change. Signed-off-by: Kenfe-Mickael Laventure <mickael.laventure@gmail.com>
This commit is contained in:
parent
50ff57b6e9
commit
3494b518a5
|
@ -196,7 +196,10 @@ func (c *diskUsageImagesContext) Reclaimable() string {
|
||||||
c.AddHeader(reclaimableHeader)
|
c.AddHeader(reclaimableHeader)
|
||||||
for _, i := range c.images {
|
for _, i := range c.images {
|
||||||
if i.Containers != 0 {
|
if i.Containers != 0 {
|
||||||
used += i.Size
|
if i.VirtualSize == -1 || i.SharedSize == -1 {
|
||||||
|
continue
|
||||||
|
}
|
||||||
|
used += i.VirtualSize - i.SharedSize
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue