Skip to content

Commit

Permalink
fix prebuild
Browse files Browse the repository at this point in the history
  • Loading branch information
Kaciras committed Nov 29, 2020
1 parent 0968882 commit cf9c7d6
Showing 1 changed file with 4 additions and 6 deletions.
10 changes: 4 additions & 6 deletions script/prebuild.js
Original file line number Diff line number Diff line change
Expand Up @@ -71,13 +71,11 @@ function download() {
const { statusCode } = response;

if (statusCode === 404) {
console.error(`没有合适的预编译文件:${url}`);
process.exit(3);
}
if (statusCode !== 200) {
console.error(`无法从 GitHub 下载预编译的文件(${statusCode}):${url}`);
process.exit(4);
return handleInstallError(`没有合适的预编译文件:${url}`);
} else if (statusCode !== 200) {
return handleInstallError(`下载失败(${statusCode}):${url}`);
}

response
.pipe(zlib.createBrotliDecompress())
.pipe(tar.extract("."));
Expand Down

0 comments on commit cf9c7d6

Please sign in to comment.