Skip to content

Commit

Permalink
fix: create api helm panic
Browse files Browse the repository at this point in the history
  • Loading branch information
yinqiwei committed Mar 21, 2024
1 parent 4abd483 commit 420457e
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion internal/plugins/helm/v1/chartutil/chart.go
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@ import (
"helm.sh/helm/v3/pkg/cli"
"helm.sh/helm/v3/pkg/downloader"
"helm.sh/helm/v3/pkg/getter"
"helm.sh/helm/v3/pkg/registry"
"helm.sh/helm/v3/pkg/repo"
)

Expand Down Expand Up @@ -181,12 +182,16 @@ func ScaffoldChart(chrt *chart.Chart, projectDir string) (*chart.Chart, string,
func fetchChartDependencies(chartPath string) error {
settings := cli.New()
getters := getter.All(settings)

client, err := registry.NewClient()
if err != nil {
return err
}
out := &bytes.Buffer{}
man := &downloader.Manager{
Out: out,
ChartPath: chartPath,
Getters: getters,
RegistryClient: client,
RepositoryConfig: settings.RepositoryConfig,
RepositoryCache: settings.RepositoryCache,
}
Expand Down

0 comments on commit 420457e

Please sign in to comment.