Skip to content

Commit

Permalink
fix: fix oci sum missing
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 aa19024 commit 7a7077f
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion pkg/client/client.go
Original file line number Diff line number Diff line change
Expand Up @@ -996,8 +996,9 @@ func (c *KpmClient) Download(dep *pkg.Dependency, homePath, localPath string) (*
// The invalid path such as '$HOME/.kcl/kpm/k8s_' is placed because the version field is missing.
dep.Version = latestTag
dep.FullName = dep.GenDepFullName()
dep.LocalFullPath = filepath.Join(filepath.Dir(localPath), dep.FullName)
dep.LocalFullPath = c.getDepStorePath(homePath, dep, false)
localPath = dep.LocalFullPath

if utils.DirExists(dep.LocalFullPath) {
dpkg, err := c.LoadPkgFromPath(localPath)
if err != nil {
Expand Down Expand Up @@ -1525,6 +1526,8 @@ func (c *KpmClient) DownloadDeps(deps *pkg.Dependencies, lockDeps *pkg.Dependenc
errors.CheckSumMismatchError,
fmt.Sprintf("checksum for '%s' changed in lock file '%s' and '%s'", lockedDep.Name, expectedSum, lockedDep.Sum),
)
} else {
lockedDep.Sum = lockDeps.Deps[d.Name].Sum
}
}

Expand Down

0 comments on commit 7a7077f

Please sign in to comment.