fix 'helm dep build' command when chart contains 'git:' dependencies

Signed-off-by: Jeff Valore <rally25rs@yahoo.com>
pull/6734/head
Jeff Valore 6 years ago
parent 6104c65004
commit a2b25b7f2a

@ -50,7 +50,6 @@ func (g *GitDownloader) ensureGitDirIgnored(repoPath string) error {
// DownloadTo will create a temp directory, then fetch a git repo into it. // DownloadTo will create a temp directory, then fetch a git repo into it.
// The git repo will be archived into a chart and copied to the destPath. // The git repo will be archived into a chart and copied to the destPath.
func (g *GitDownloader) DownloadTo(gitURL string, ref string, destPath string) error { func (g *GitDownloader) DownloadTo(gitURL string, ref string, destPath string) error {
// the git archive command returns a tgz archive. we need to extract it to get the actual chart files.
tmpDir, err := ioutil.TempDir("", "helm") tmpDir, err := ioutil.TempDir("", "helm")
if err != nil { if err != nil {
return err return err

@ -367,6 +367,11 @@ Loop:
continue continue
} }
// If repo is from git url, continue
if strings.HasPrefix(dd.Repository, "git:") {
continue
}
if dd.Repository == "" { if dd.Repository == "" {
continue continue
} }

@ -27,7 +27,7 @@ import (
"helm.sh/helm/v3/internal/version" "helm.sh/helm/v3/internal/version"
) )
// HTTPGetter is the efault HTTP(/S) backend handler // HTTPGetter is the default HTTP(/S) backend handler
type HTTPGetter struct { type HTTPGetter struct {
client *http.Client client *http.Client
opts options opts options

Loading…
Cancel
Save