mirror of
https://github.com/containers/podman.git
synced 2025-06-29 15:08:09 +08:00
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:
@ -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
|
||||
}
|
||||
|
Reference in New Issue
Block a user