Skip to content

Commit

Permalink
feat: fix #2
Browse files Browse the repository at this point in the history
  • Loading branch information
Jasonzyt committed Feb 7, 2024
1 parent 5c17b52 commit 9b0e826
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 3 deletions.
1 change: 0 additions & 1 deletion main.go
Original file line number Diff line number Diff line change
Expand Up @@ -130,7 +130,6 @@ func main() {
if err != nil {
logger.LogError(err)
// TODO: Add rollback
// TODO: Add tips for common errors(clearing cache, etc.)
return
}
logger.LogSuccess("Install complete.")
Expand Down
11 changes: 9 additions & 2 deletions utils/install.go
Original file line number Diff line number Diff line change
Expand Up @@ -124,8 +124,15 @@ Unzip:
BarEnd: "]",
}))

Unzip(file, bar)
logger.Log(" Unzip complete!")
err = Unzip(file, bar)
if err != nil {
if useCache {
logger.LogWarning(" Failed to unzip files. Consider clearing cache(--clear-cache) or disable cache(--no-cache) and try again.")
}
return err
} else {
logger.Log(" Unzip complete!")
}

file.Close()
if !useCache {
Expand Down

0 comments on commit 9b0e826

Please sign in to comment.