add githubError.Cause back after more analysis

Signed-off-by: James Sheppard <jgsheppa@protonmail.com>
pull/12063/head
James Sheppard 2 years ago
parent f359aec557
commit e46c80d9f2

@ -20,6 +20,7 @@ import (
"io"
"os"
"github.com/pkg/errors"
"github.com/spf13/cobra"
"helm.sh/helm/v3/cmd/helm/require"
@ -49,5 +50,5 @@ func newRepoCmd(out io.Writer) *cobra.Command {
}
func isNotExist(err error) bool {
return os.IsNotExist(err)
return os.IsNotExist(errors.Cause(err))
}

@ -400,7 +400,7 @@ func (c *ChartDownloader) scanReposForURL(u string, rf *repo.File) (*repo.Entry,
func loadRepoConfig(file string) (*repo.File, error) {
r, err := repo.LoadFile(file)
if err != nil && !os.IsNotExist(err) {
if err != nil && !os.IsNotExist(githubErrors.Cause(err)) {
return nil, err
}
return r, nil

Loading…
Cancel
Save