Skip to content

Commit

Permalink
fix by integration test
Browse files Browse the repository at this point in the history
  • Loading branch information
MrLYC committed May 7, 2023
1 parent fede815 commit 5bae55f
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 3 deletions.
4 changes: 4 additions & 0 deletions core/initializer/command.go
Original file line number Diff line number Diff line change
Expand Up @@ -64,6 +64,10 @@ func (c *CmdrUpdater) removeLegacies(safeVersions []string) error {

var errs error
for _, command := range commands {
if command.GetActivated() {
continue
}

version := command.GetVersion()
isSafe := false
for _, safeVersion := range safeVersions {
Expand Down
6 changes: 3 additions & 3 deletions core/manager/binary.go
Original file line number Diff line number Diff line change
Expand Up @@ -284,10 +284,10 @@ func NewBinaryManagerWithCopy(
dirMode os.FileMode,
) *BinaryManager {
return NewBinaryManager(binDir, shimsDir, dirMode, func(src, dst string) error {
srcDir, srcName := filepath.Split(src)
helper := utils.NewPathHelper(srcDir)
dstDir, dstName := filepath.Split(dst)
helper := utils.NewPathHelper(dstDir)

return helper.CopyFile(srcName, dst, 0755)
return helper.CopyFile(dstName, src, 0755)
})
}

Expand Down

0 comments on commit 5bae55f

Please sign in to comment.