Skip to content

Commit d165457

Browse files
committed
test: test skip get checksum
1 parent 864635a commit d165457

File tree

1 file changed

+8
-1
lines changed

1 file changed

+8
-1
lines changed

pkg/client/update.go

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -139,7 +139,7 @@ func (c *KpmClient) Update(options ...UpdateOption) (*pkg.KclPkg, error) {
139139
}
140140

141141
selectedDep.LocalFullPath = dep.LocalFullPath
142-
if selectedDep.Sum == "" {
142+
if selectedDep.Sum == "" && NeedCheckSum(*selectedDep) {
143143
sum, err := c.AcquireDepSum(*selectedDep)
144144
if err != nil {
145145
return err
@@ -223,3 +223,10 @@ func (c *KpmClient) AcquireDepSum(dep pkg.Dependency) (string, error) {
223223

224224
return "", nil
225225
}
226+
227+
// NeedCheckSum reports whether to check the checksum for the given module.
228+
func NeedCheckSum(dep pkg.Dependency) bool {
229+
fmt.Printf(dep.ToString())
230+
return false
231+
232+
}

0 commit comments

Comments
 (0)