summaryrefslogtreecommitdiff
path: root/pkg/domain/infra/abi/pods.go
diff options
context:
space:
mode:
authorDaniel J Walsh <dwalsh@redhat.com>2022-09-10 07:40:39 -0400
committerDaniel J Walsh <dwalsh@redhat.com>2022-09-10 07:52:00 -0400
commit2c63b8439bbdc09203ea394ad2cf9352830861f0 (patch)
tree39b9d8d061bc248e4dbeb6445c2ad0c99b048ae1 /pkg/domain/infra/abi/pods.go
parent2d8417d86a7edf11bce5527f311bb951a651d40e (diff)
downloadpodman-2c63b8439bbdc09203ea394ad2cf9352830861f0.tar.gz
podman-2c63b8439bbdc09203ea394ad2cf9352830861f0.tar.bz2
podman-2c63b8439bbdc09203ea394ad2cf9352830861f0.zip
Fix stutters
Podman adds an Error: to every error message. So starting an error message with "error" ends up being reported to the user as Error: error ... This patch removes the stutter. Also ioutil.ReadFile errors report the Path, so wrapping the err message with the path causes a stutter. Signed-off-by: Daniel J Walsh <dwalsh@redhat.com>
Diffstat (limited to 'pkg/domain/infra/abi/pods.go')
-rw-r--r--pkg/domain/infra/abi/pods.go12
1 files changed, 6 insertions, 6 deletions
diff --git a/pkg/domain/infra/abi/pods.go b/pkg/domain/infra/abi/pods.go
index 68f2fa125..45a47b46e 100644
--- a/pkg/domain/infra/abi/pods.go
+++ b/pkg/domain/infra/abi/pods.go
@@ -77,7 +77,7 @@ func (ic *ContainerEngine) PodKill(ctx context.Context, namesOrIds []string, opt
}
if len(conErrs) > 0 {
for id, err := range conErrs {
- report.Errs = append(report.Errs, fmt.Errorf("error killing container %s: %w", id, err))
+ report.Errs = append(report.Errs, fmt.Errorf("killing container %s: %w", id, err))
}
reports = append(reports, &report)
continue
@@ -143,7 +143,7 @@ func (ic *ContainerEngine) PodPause(ctx context.Context, namesOrIds []string, op
}
if len(errs) > 0 {
for id, v := range errs {
- report.Errs = append(report.Errs, fmt.Errorf("error pausing container %s: %w", id, v))
+ report.Errs = append(report.Errs, fmt.Errorf("pausing container %s: %w", id, v))
}
reports = append(reports, &report)
continue
@@ -177,7 +177,7 @@ func (ic *ContainerEngine) PodUnpause(ctx context.Context, namesOrIds []string,
}
if len(errs) > 0 {
for id, v := range errs {
- report.Errs = append(report.Errs, fmt.Errorf("error unpausing container %s: %w", id, v))
+ report.Errs = append(report.Errs, fmt.Errorf("unpausing container %s: %w", id, v))
}
reports = append(reports, &report)
continue
@@ -203,7 +203,7 @@ func (ic *ContainerEngine) PodStop(ctx context.Context, namesOrIds []string, opt
}
if len(errs) > 0 {
for id, v := range errs {
- report.Errs = append(report.Errs, fmt.Errorf("error stopping container %s: %w", id, v))
+ report.Errs = append(report.Errs, fmt.Errorf("stopping container %s: %w", id, v))
}
reports = append(reports, &report)
continue
@@ -229,7 +229,7 @@ func (ic *ContainerEngine) PodRestart(ctx context.Context, namesOrIds []string,
}
if len(errs) > 0 {
for id, v := range errs {
- report.Errs = append(report.Errs, fmt.Errorf("error restarting container %s: %w", id, v))
+ report.Errs = append(report.Errs, fmt.Errorf("restarting container %s: %w", id, v))
}
reports = append(reports, &report)
continue
@@ -256,7 +256,7 @@ func (ic *ContainerEngine) PodStart(ctx context.Context, namesOrIds []string, op
}
if len(errs) > 0 {
for id, v := range errs {
- report.Errs = append(report.Errs, fmt.Errorf("error starting container %s: %w", id, v))
+ report.Errs = append(report.Errs, fmt.Errorf("starting container %s: %w", id, v))
}
reports = append(reports, &report)
continue