Follow redirects
This commit is contained in:
parent
d70300d9f5
commit
df0590b2ee
340 changed files with 17786 additions and 16731 deletions
4
lib/tools-download.js
generated
4
lib/tools-download.js
generated
|
|
@ -24,10 +24,10 @@ var __importStar = (this && this.__importStar) || function (mod) {
|
|||
};
|
||||
Object.defineProperty(exports, "__esModule", { value: true });
|
||||
exports.downloadAndExtract = downloadAndExtract;
|
||||
const https = __importStar(require("https"));
|
||||
const path = __importStar(require("path"));
|
||||
const perf_hooks_1 = require("perf_hooks");
|
||||
const toolcache = __importStar(require("@actions/tool-cache"));
|
||||
const follow_redirects_1 = require("follow-redirects");
|
||||
const uuid_1 = require("uuid");
|
||||
const feature_flags_1 = require("./feature-flags");
|
||||
const tar = __importStar(require("./tar"));
|
||||
|
|
@ -81,7 +81,7 @@ async function downloadAndExtract(codeqlURL, authorization, headers, tarVersion,
|
|||
}
|
||||
async function downloadAndExtractZstdWithStreaming(codeqlURL, authorization, headers, tarVersion, logger) {
|
||||
headers = Object.assign({ "User-Agent": "CodeQL Action", authorization }, headers);
|
||||
const response = await new Promise((resolve) => https.get(codeqlURL, { headers }, (r) => resolve(r)));
|
||||
const response = await new Promise((resolve) => follow_redirects_1.https.get(codeqlURL, { headers }, (r) => resolve(r)));
|
||||
if (response.statusCode !== 200) {
|
||||
throw new Error(`Failed to download CodeQL bundle from ${codeqlURL}. HTTP status code: ${response.statusCode}.`);
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue