From 957debec7bdedea9f5600cbddce23d123c2d6b99 Mon Sep 17 00:00:00 2001 From: James Sheppard Date: Sun, 7 May 2023 16:59:04 +0000 Subject: [PATCH] use std lib errors pkg in archive.go Signed-off-by: James Sheppard --- pkg/chart/loader/archive.go | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/pkg/chart/loader/archive.go b/pkg/chart/loader/archive.go index 8b38cb89f..3515f814c 100644 --- a/pkg/chart/loader/archive.go +++ b/pkg/chart/loader/archive.go @@ -20,6 +20,7 @@ import ( "archive/tar" "bytes" "compress/gzip" + "errors" "fmt" "io" "net/http" @@ -28,8 +29,6 @@ import ( "regexp" "strings" - "github.com/pkg/errors" - "helm.sh/helm/v3/pkg/chart" ) @@ -151,7 +150,7 @@ func LoadArchiveFiles(in io.Reader) ([]*BufferedFile, error) { n = path.Clean(n) if n == "." { // In this case, the original path was relative when it should have been absolute. - return nil, errors.Errorf("chart illegally contains content outside the base directory: %q", hd.Name) + return nil, fmt.Errorf("chart illegally contains content outside the base directory: %q", hd.Name) } if strings.HasPrefix(n, "..") { return nil, errors.New("chart illegally references parent directory")