summaryrefslogtreecommitdiff
path: root/cmd/podman/system/reset.go
diff options
context:
space:
mode:
authorDaniel J Walsh <dwalsh@redhat.com>2020-11-17 07:02:11 -0500
committerDaniel J Walsh <dwalsh@redhat.com>2020-11-17 09:19:22 -0500
commit389dcb5c29d926e89d5d4c0b26ebf434c2fe5dcb (patch)
treef3970765fe109233dd441da8a7c5b3b5da3e945e /cmd/podman/system/reset.go
parent7d067afac716927b26c452d4d75478b9f13abd62 (diff)
downloadpodman-389dcb5c29d926e89d5d4c0b26ebf434c2fe5dcb.tar.gz
podman-389dcb5c29d926e89d5d4c0b26ebf434c2fe5dcb.tar.bz2
podman-389dcb5c29d926e89d5d4c0b26ebf434c2fe5dcb.zip
Remove some more excessive wrapping and stuttering
Stop over wrapping API Calls The API calls will return an appropriate error, and this wrapping just makes the error message look like it is stuttering and a big mess. Signed-off-by: Daniel J Walsh <dwalsh@redhat.com>
Diffstat (limited to 'cmd/podman/system/reset.go')
-rw-r--r--cmd/podman/system/reset.go8
1 files changed, 4 insertions, 4 deletions
diff --git a/cmd/podman/system/reset.go b/cmd/podman/system/reset.go
index d38a1a427..97f4fba28 100644
--- a/cmd/podman/system/reset.go
+++ b/cmd/podman/system/reset.go
@@ -13,7 +13,7 @@ import (
"github.com/containers/podman/v2/cmd/podman/validate"
"github.com/containers/podman/v2/pkg/domain/entities"
"github.com/containers/podman/v2/pkg/domain/infra"
- "github.com/pkg/errors"
+ "github.com/sirupsen/logrus"
"github.com/spf13/cobra"
)
@@ -57,7 +57,7 @@ WARNING! This will remove:
Are you sure you want to continue? [y/N] `)
answer, err := reader.ReadString('\n')
if err != nil {
- fmt.Println(errors.Wrapf(err, "error reading input"))
+ logrus.Error(err)
os.Exit(1)
}
if strings.ToLower(answer)[0] != 'y' {
@@ -71,13 +71,13 @@ Are you sure you want to continue? [y/N] `)
engine, err := infra.NewSystemEngine(entities.ResetMode, registry.PodmanConfig())
if err != nil {
- fmt.Println(err)
+ logrus.Error(err)
os.Exit(125)
}
defer engine.Shutdown(registry.Context())
if err := engine.Reset(registry.Context()); err != nil {
- fmt.Println(err)
+ logrus.Error(err)
os.Exit(125)
}
os.Exit(0)