Skip to content

Commit

Permalink
fix: rm fetch metadata during loading kcl.mod
Browse files Browse the repository at this point in the history
Signed-off-by: zongz <[email protected]>
  • Loading branch information
zong-zhe committed May 24, 2024
1 parent ec21ccf commit e0fb793
Showing 1 changed file with 0 additions and 21 deletions.
21 changes: 0 additions & 21 deletions pkg/client/client.go
Original file line number Diff line number Diff line change
Expand Up @@ -899,27 +899,6 @@ func (c *KpmClient) FillDepInfo(dep *pkg.Dependency, homepath string) error {
urlpath := utils.JoinPath(c.GetSettings().DefaultOciRepo(), dep.Name)
dep.Source.Oci.Repo = urlpath
}
manifest := ocispec.Manifest{}
jsonDesc, err := c.FetchOciManifestIntoJsonStr(opt.OciFetchOptions{
FetchBytesOptions: oras.DefaultFetchBytesOptions,
OciOptions: opt.OciOptions{
Reg: dep.Source.Oci.Reg,
Repo: dep.Source.Oci.Repo,
Tag: dep.Version,
},
})

if err == nil {
err = json.Unmarshal([]byte(jsonDesc), &manifest)
if err != nil {
return err
}

if value, ok := manifest.Annotations[constants.DEFAULT_KCL_OCI_MANIFEST_SUM]; ok {
dep.Sum = value
}
}
return nil
}
return nil
}
Expand Down

0 comments on commit e0fb793

Please sign in to comment.