diff --git a/pkg/plugin/installer/http_installer.go b/pkg/plugin/installer/http_installer.go index 543955ca4..1d676775e 100644 --- a/pkg/plugin/installer/http_installer.go +++ b/pkg/plugin/installer/http_installer.go @@ -19,6 +19,7 @@ import ( "archive/tar" "bytes" "compress/gzip" + "errors" "fmt" "io" "os" @@ -28,7 +29,7 @@ import ( "strings" securejoin "github.com/cyphar/filepath-securejoin" - "github.com/pkg/errors" + githubErrors "github.com/pkg/errors" "helm.sh/helm/v3/internal/third_party/dep/fs" "helm.sh/helm/v3/pkg/cli" @@ -133,7 +134,7 @@ func (i *HTTPInstaller) Install() error { } if err := i.extractor.Extract(pluginData, i.CacheDir); err != nil { - return errors.Wrap(err, "extracting files from archive") + return githubErrors.Wrap(err, "extracting files from archive") } if !isPlugin(i.CacheDir) { diff --git a/pkg/plugin/installer/local_installer.go b/pkg/plugin/installer/local_installer.go index 759df38be..e95251620 100644 --- a/pkg/plugin/installer/local_installer.go +++ b/pkg/plugin/installer/local_installer.go @@ -16,10 +16,11 @@ limitations under the License. package installer // import "helm.sh/helm/v3/pkg/plugin/installer" import ( + "errors" "os" "path/filepath" - "github.com/pkg/errors" + githubErrors "github.com/pkg/errors" ) // ErrPluginNotAFolder indicates that the plugin path is not a folder. @@ -34,7 +35,7 @@ type LocalInstaller struct { func NewLocalInstaller(source string) (*LocalInstaller, error) { src, err := filepath.Abs(source) if err != nil { - return nil, errors.Wrap(err, "unable to get absolute path to plugin") + return nil, githubErrors.Wrap(err, "unable to get absolute path to plugin") } i := &LocalInstaller{ base: newBase(src),