Skip to content

Commit

Permalink
feat: change git download from DownloadFromGit to GitDownloader
Browse files Browse the repository at this point in the history
Signed-off-by: Asish Kumar <[email protected]>
  • Loading branch information
officialasishkumar committed May 30, 2024
1 parent 6359c77 commit 33f0bac
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion pkg/client/client.go
Original file line number Diff line number Diff line change
Expand Up @@ -961,7 +961,12 @@ func (c *KpmClient) AcquireTheLatestOciVersion(ociSource pkg.Oci) (string, error
// Download will download the dependency to the local path.
func (c *KpmClient) Download(dep *pkg.Dependency, homePath, localPath string) (*pkg.Dependency, error) {
if dep.Source.Git != nil {
_, err := c.DownloadFromGit(dep.Source.Git, localPath)
err := c.DepDownloader.Download(*downloader.NewDownloadOptions(
downloader.WithLocalPath(localPath),
downloader.WithSource(dep.Source),
downloader.WithLogWriter(c.logWriter),
downloader.WithSettings(c.settings),
))
if err != nil {
return nil, err
}
Expand Down

0 comments on commit 33f0bac

Please sign in to comment.