cmd/podman: switch to golang native error wrapping

We now use the golang error wrapping format specifier `%w` instead of
the deprecated github.com/pkg/errors package.

Signed-off-by: Sascha Grunert <sgrunert@redhat.com>
This commit is contained in:
Sascha Grunert
2022-06-30 10:05:44 +02:00
parent 3426d56b92
commit e8adec5f41
88 changed files with 343 additions and 379 deletions

View File

@ -9,7 +9,6 @@ import (
"os/exec"
"path/filepath"
"github.com/pkg/errors"
"github.com/spf13/cobra"
)
@ -48,13 +47,13 @@ func uninstall(cmd *cobra.Command, args []string) error {
if err := os.Remove(fileName); err != nil {
if !os.IsNotExist(err) {
return errors.Errorf("could not remove plist file: %s", fileName)
return fmt.Errorf("could not remove plist file: %s", fileName)
}
}
helperPath := filepath.Join(installPrefix, "podman", "helper", userName)
if err := os.RemoveAll(helperPath); err != nil {
return errors.Errorf("could not remove helper binary path: %s", helperPath)
return fmt.Errorf("could not remove helper binary path: %s", helperPath)
}
return nil
}