mirror of
https://github.com/kubernetes-sigs/kustomize.git
synced 2026-06-29 09:40:49 +00:00
remove direct dependency on github/pkg/errors (#4970)
This commit is contained in:
@@ -7,8 +7,8 @@ import (
|
||||
"os/exec"
|
||||
"time"
|
||||
|
||||
"github.com/pkg/errors"
|
||||
"sigs.k8s.io/kustomize/api/internal/utils"
|
||||
"sigs.k8s.io/kustomize/kyaml/errors"
|
||||
"sigs.k8s.io/kustomize/kyaml/filesys"
|
||||
)
|
||||
|
||||
@@ -24,7 +24,7 @@ type gitRunner struct {
|
||||
func newCmdRunner(timeout time.Duration) (*gitRunner, error) {
|
||||
gitProgram, err := exec.LookPath("git")
|
||||
if err != nil {
|
||||
return nil, errors.Wrap(err, "no 'git' program on path")
|
||||
return nil, errors.WrapPrefixf(err, "no 'git' program on path")
|
||||
}
|
||||
dir, err := filesys.NewTmpConfirmedDir()
|
||||
if err != nil {
|
||||
@@ -48,7 +48,7 @@ func (r gitRunner) run(args ...string) error {
|
||||
func() error {
|
||||
out, err := cmd.CombinedOutput()
|
||||
if err != nil {
|
||||
return errors.Wrapf(err, "failed to run '%s': %s", cmd.String(), string(out))
|
||||
return errors.WrapPrefixf(err, "failed to run '%s': %s", cmd.String(), string(out))
|
||||
}
|
||||
return err
|
||||
})
|
||||
|
||||
Reference in New Issue
Block a user