Skip to content

Commit 33f0bac

Browse files
feat: change git download from DownloadFromGit to GitDownloader
Signed-off-by: Asish Kumar <officialasishkumar@gmail.com>
1 parent 6359c77 commit 33f0bac

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

pkg/client/client.go

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -961,7 +961,12 @@ func (c *KpmClient) AcquireTheLatestOciVersion(ociSource pkg.Oci) (string, error
961961
// Download will download the dependency to the local path.
962962
func (c *KpmClient) Download(dep *pkg.Dependency, homePath, localPath string) (*pkg.Dependency, error) {
963963
if dep.Source.Git != nil {
964-
_, err := c.DownloadFromGit(dep.Source.Git, localPath)
964+
err := c.DepDownloader.Download(*downloader.NewDownloadOptions(
965+
downloader.WithLocalPath(localPath),
966+
downloader.WithSource(dep.Source),
967+
downloader.WithLogWriter(c.logWriter),
968+
downloader.WithSettings(c.settings),
969+
))
965970
if err != nil {
966971
return nil, err
967972
}

0 commit comments

Comments
 (0)