From 2f47838ea11e49ee51b5af54d1699ad986da345a Mon Sep 17 00:00:00 2001 From: zhyon404 Date: Mon, 5 Sep 2022 18:05:03 +0800 Subject: [PATCH] return di.Err when it's not nil Signed-off-by: zhyon404 --- commands/diskusage.go | 2 +- commands/prune.go | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/commands/diskusage.go b/commands/diskusage.go index 372bd583..6286bb5f 100644 --- a/commands/diskusage.go +++ b/commands/diskusage.go @@ -40,7 +40,7 @@ func runDiskUsage(dockerCli command.Cli, opts duOptions) error { for _, di := range dis { if di.Err != nil { - return err + return di.Err } } diff --git a/commands/prune.go b/commands/prune.go index d8ae9b43..730daceb 100644 --- a/commands/prune.go +++ b/commands/prune.go @@ -61,7 +61,7 @@ func runPrune(dockerCli command.Cli, opts pruneOptions) error { for _, di := range dis { if di.Err != nil { - return err + return di.Err } }