Skip to content

Commit

Permalink
Code style fix
Browse files Browse the repository at this point in the history
  • Loading branch information
mozok authored and aglitchman committed May 1, 2024
1 parent 4efb3da commit 71c46e8
Showing 1 changed file with 16 additions and 16 deletions.
32 changes: 16 additions & 16 deletions playable_ad/gulpfile.js
Original file line number Diff line number Diff line change
Expand Up @@ -178,26 +178,26 @@ function javaIsInstalled(cb) {
function fetchBobVersionInfo(cb) {
if (options["engine-sha1"] == undefined) {
https
.get(bobJarVersionInfoUrl, function (res) {
res.setEncoding("utf8");
.get(bobJarVersionInfoUrl, function (res) {
res.setEncoding("utf8");

let body = "";
res.on("data", function (data) {
body += data;
});
res.on("end", function () {
bobJarVersionInfo = JSON.parse(body);
let body = "";
res.on("data", function (data) {
body += data;
});
res.on("end", function () {
bobJarVersionInfo = JSON.parse(body);

if (!/^[a-f0-9]{40}$/i.test(bobJarVersionInfo.sha1)) {
throw "Invalid bob.jar SHA-1.";
}
if (!/^[a-f0-9]{40}$/i.test(bobJarVersionInfo.sha1)) {
throw "Invalid bob.jar SHA-1.";
}

cb();
cb();
});
})
.on("error", function (e) {
cb(e);
});
})
.on("error", function (e) {
cb(e);
});
} else {
bobJarVersionInfo = {
sha1: options["engine-sha1"]
Expand Down

0 comments on commit 71c46e8

Please sign in to comment.