mirror of
https://github.com/github/codeql-action.git
synced 2026-10-21 02:01:27 +00:00
Log more in getProxyBinaryPath
This commit is contained in:
47
lib/entry-points.js
generated
47
lib/entry-points.js
generated
@@ -187759,25 +187759,38 @@ function getProxyFilename() {
|
||||
}
|
||||
async function getProxyBinaryPath(action, apiDetails) {
|
||||
const logger2 = action.logger;
|
||||
const proxyFileName = getProxyFilename();
|
||||
const proxyInfo = await getDownloadUrl(action, apiDetails);
|
||||
let proxyBin = toolcache4.find(proxyFileName, proxyInfo.version);
|
||||
if (!proxyBin) {
|
||||
const authorization = getAuthorizationHeaderFor(
|
||||
logger2,
|
||||
apiDetails,
|
||||
proxyInfo.url
|
||||
);
|
||||
const temp = await downloadProxy(logger2, proxyInfo.url, authorization);
|
||||
const extracted = await extractProxy(logger2, temp);
|
||||
proxyBin = await cacheProxy(
|
||||
logger2,
|
||||
extracted,
|
||||
proxyFileName,
|
||||
proxyInfo.version
|
||||
logger2.startGroup("Setting up authentication proxy");
|
||||
try {
|
||||
const proxyFileName = getProxyFilename();
|
||||
const proxyInfo = await getDownloadUrl(action, apiDetails);
|
||||
logger2.info(
|
||||
`Using authentication proxy from CodeQL release ${proxyInfo.version}.`
|
||||
);
|
||||
let proxyBin = toolcache4.find(proxyFileName, proxyInfo.version);
|
||||
if (!proxyBin) {
|
||||
logger2.info(
|
||||
`Authentication proxy is not in the toolcache. Will try to download it from '${proxyInfo.url}'.`
|
||||
);
|
||||
const authorization = getAuthorizationHeaderFor(
|
||||
logger2,
|
||||
apiDetails,
|
||||
proxyInfo.url
|
||||
);
|
||||
const temp = await downloadProxy(logger2, proxyInfo.url, authorization);
|
||||
logger2.info(`Downloaded the authentication proxy assset to '${temp}'.`);
|
||||
const extracted = await extractProxy(logger2, temp);
|
||||
proxyBin = await cacheProxy(
|
||||
logger2,
|
||||
extracted,
|
||||
proxyFileName,
|
||||
proxyInfo.version
|
||||
);
|
||||
logger2.info(`Extracted the authentication proxy to '${proxyBin}'.`);
|
||||
}
|
||||
return path27.join(proxyBin, proxyFileName);
|
||||
} finally {
|
||||
logger2.endGroup();
|
||||
}
|
||||
return path27.join(proxyBin, proxyFileName);
|
||||
}
|
||||
|
||||
// src/start-proxy/ca.ts
|
||||
|
||||
@@ -537,24 +537,44 @@ export async function getProxyBinaryPath(
|
||||
apiDetails: GitHubApiDetails,
|
||||
): Promise<string> {
|
||||
const logger = action.logger;
|
||||
const proxyFileName = getProxyFilename();
|
||||
const proxyInfo = await getDownloadUrl(action, apiDetails);
|
||||
logger.startGroup("Setting up authentication proxy");
|
||||
|
||||
let proxyBin = toolcache.find(proxyFileName, proxyInfo.version);
|
||||
if (!proxyBin) {
|
||||
const authorization = getAuthorizationHeaderFor(
|
||||
logger,
|
||||
apiDetails,
|
||||
proxyInfo.url,
|
||||
);
|
||||
const temp = await downloadProxy(logger, proxyInfo.url, authorization);
|
||||
const extracted = await extractProxy(logger, temp);
|
||||
proxyBin = await cacheProxy(
|
||||
logger,
|
||||
extracted,
|
||||
proxyFileName,
|
||||
proxyInfo.version,
|
||||
try {
|
||||
const proxyFileName = getProxyFilename();
|
||||
const proxyInfo = await getDownloadUrl(action, apiDetails);
|
||||
|
||||
logger.info(
|
||||
`Using authentication proxy from CodeQL release ${proxyInfo.version}.`,
|
||||
);
|
||||
|
||||
let proxyBin = toolcache.find(proxyFileName, proxyInfo.version);
|
||||
|
||||
if (!proxyBin) {
|
||||
logger.info(
|
||||
`Authentication proxy is not in the toolcache. Will try to download it from '${proxyInfo.url}'.`,
|
||||
);
|
||||
|
||||
const authorization = getAuthorizationHeaderFor(
|
||||
logger,
|
||||
apiDetails,
|
||||
proxyInfo.url,
|
||||
);
|
||||
const temp = await downloadProxy(logger, proxyInfo.url, authorization);
|
||||
|
||||
logger.info(`Downloaded the authentication proxy assset to '${temp}'.`);
|
||||
|
||||
const extracted = await extractProxy(logger, temp);
|
||||
proxyBin = await cacheProxy(
|
||||
logger,
|
||||
extracted,
|
||||
proxyFileName,
|
||||
proxyInfo.version,
|
||||
);
|
||||
|
||||
logger.info(`Extracted the authentication proxy to '${proxyBin}'.`);
|
||||
}
|
||||
return path.join(proxyBin, proxyFileName);
|
||||
} finally {
|
||||
logger.endGroup();
|
||||
}
|
||||
return path.join(proxyBin, proxyFileName);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user