Skip to content

Commit

Permalink
fix: downloadAndExtract function
Browse files Browse the repository at this point in the history
  • Loading branch information
juev committed Dec 10, 2023
1 parent 8fb3b9e commit e2b2820
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions helpers.go
Expand Up @@ -334,7 +334,7 @@ func (gb *GoBrew) downloadAndExtract(version string) {
err := utils.DownloadWithProgress(downloadURL, tarName, dstDownloadDir)

if err != nil {
gb.cleanVersionDir(version)
gb.cleanDownloadsDir()
color.Infoln("==> [Info] Downloading version failed:", err)
color.Errorln("==> [Error]: Please check connectivity to url:", downloadURL)
os.Exit(1)
Expand All @@ -351,7 +351,6 @@ func (gb *GoBrew) downloadAndExtract(version string) {
// clean up dir
gb.cleanVersionDir(version)
color.Infoln("==> [Info] Extract failed:", err)
color.Errorln("==> [Error]: Please check if version exists from url:", downloadURL)
os.Exit(1)
}
color.Infoln("[Success] Extract to", gb.getVersionDir(version))
Expand Down

0 comments on commit e2b2820

Please sign in to comment.