Skip to content

Commit

Permalink
修复下载链接为404时会继续安装的问题
Browse files Browse the repository at this point in the history
  • Loading branch information
Jrohy committed Sep 10, 2022
1 parent 3177d66 commit f20b7d5
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions utils.go
Original file line number Diff line number Diff line change
Expand Up @@ -99,6 +99,9 @@ func downloadFile(url, downLoadPath string) {
continue
}
}
if resp.StatusCode == 404 {
exit(fmt.Sprintf("%s: 404 Not Found", url))
}
if downLoadPath == "" {
downLoadPath = fullPath(path.Base(url))
}
Expand Down

0 comments on commit f20b7d5

Please sign in to comment.