Skip to content

Commit

Permalink
check target dir s available before deleting old toolbox binary
Browse files Browse the repository at this point in the history
  • Loading branch information
bakito committed Oct 12, 2024
1 parent c232409 commit 338ce3c
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions pkg/fetcher/fetch.go
Original file line number Diff line number Diff line change
Expand Up @@ -93,16 +93,17 @@ func (f *fetcher) Fetch(cfgFile string, selectedTools ...string) error {
f.checkUpxAvailable()
}

if err := f.assureTargetDirAvailable(tb); err != nil {
return err
}

if err := f.deleteOldBinary(tb); err != nil {
return err
}

if tb.Aliases != nil {
aliases = *tb.Aliases
}
if err := f.assureTargetDirAvailable(tb); err != nil {
return err
}

ver, err := readVersions(tb.Target)
if err != nil {
Expand Down

0 comments on commit 338ce3c

Please sign in to comment.