From 2c63b8439bbdc09203ea394ad2cf9352830861f0 Mon Sep 17 00:00:00 2001 From: Daniel J Walsh Date: Sat, 10 Sep 2022 07:40:39 -0400 Subject: 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 --- libpod/util_linux.go | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'libpod/util_linux.go') diff --git a/libpod/util_linux.go b/libpod/util_linux.go index 7c79e6ce4..efc11710f 100644 --- a/libpod/util_linux.go +++ b/libpod/util_linux.go @@ -29,7 +29,7 @@ func systemdSliceFromPath(parent, name string, resources *spec.LinuxResources) ( logrus.Debugf("Created cgroup path %s for parent %s and name %s", cgroupPath, parent, name) if err := makeSystemdCgroup(cgroupPath, resources); err != nil { - return "", fmt.Errorf("error creating cgroup %s: %w", cgroupPath, err) + return "", fmt.Errorf("creating cgroup %s: %w", cgroupPath, err) } logrus.Debugf("Created cgroup %s", cgroupPath) @@ -112,17 +112,17 @@ var lvpReleaseLabel = label.ReleaseLabel func LabelVolumePath(path string) error { _, mountLabel, err := lvpInitLabels([]string{}) if err != nil { - return fmt.Errorf("error getting default mountlabels: %w", err) + return fmt.Errorf("getting default mountlabels: %w", err) } if err := lvpReleaseLabel(mountLabel); err != nil { - return fmt.Errorf("error releasing label %q: %w", mountLabel, err) + return fmt.Errorf("releasing label %q: %w", mountLabel, err) } if err := lvpRelabel(path, mountLabel, true); err != nil { if err == syscall.ENOTSUP { logrus.Debugf("Labeling not supported on %q", path) } else { - return fmt.Errorf("error setting selinux label for %s to %q as shared: %w", path, mountLabel, err) + return fmt.Errorf("setting selinux label for %s to %q as shared: %w", path, mountLabel, err) } } return nil -- cgit v1.2.3-54-g00ecf