Skip to content

Commit

Permalink
fix: fix test case
Browse files Browse the repository at this point in the history
Signed-off-by: zongz <[email protected]>
  • Loading branch information
zong-zhe committed Jun 5, 2024
1 parent 755928d commit 12338e0
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions pkg/client/client.go
Original file line number Diff line number Diff line change
Expand Up @@ -1001,6 +1001,12 @@ func (c *KpmClient) Download(dep *pkg.Dependency, homePath, localPath string) (*
}

// rename the tmp dir to the local path.
if utils.DirExists(localPath) {
err := os.RemoveAll(localPath)
if err != nil {
return nil, err
}
}
err = os.Rename(tmpDir, localPath)
if err != nil {
return nil, err
Expand Down

0 comments on commit 12338e0

Please sign in to comment.