Skip to content

Commit

Permalink
Handling name of OCI file
Browse files Browse the repository at this point in the history
Signed-off-by: Andrew Block <andy.block@gmail.com>
  • Loading branch information
sabre1041 committed Jan 12, 2022
1 parent 23989f9 commit 1a9cb93
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 1 deletion.
1 change: 1 addition & 0 deletions pkg/action/pull.go
Original file line number Diff line number Diff line change
Expand Up @@ -87,6 +87,7 @@ func (p *Pull) Run(chartRef string) (string, error) {
getter.WithTLSClientConfig(p.CertFile, p.KeyFile, p.CaFile),
getter.WithInsecureSkipVerifyTLS(p.InsecureSkipTLSverify),
},
RegistryClient: p.cfg.RegistryClient,
RepositoryConfig: p.Settings.RepositoryConfig,
RepositoryCache: p.Settings.RepositoryCache,
}
Expand Down
3 changes: 2 additions & 1 deletion pkg/downloader/chart_downloader.go
Original file line number Diff line number Diff line change
Expand Up @@ -103,7 +103,8 @@ func (c *ChartDownloader) DownloadTo(ref, version, dest string) (string, *proven

name := filepath.Base(u.Path)
if u.Scheme == registry.OCIScheme {
name = fmt.Sprintf("%s-%s.tgz", name, version)
idx := strings.LastIndexByte(name, ':')
name = fmt.Sprintf("%s-%s.tgz", name[:idx], name[idx+1:])
}

destfile := filepath.Join(dest, name)
Expand Down

0 comments on commit 1a9cb93

Please sign in to comment.