mirror of
https://github.com/github/codeql-action.git
synced 2026-04-29 02:18:47 +00:00
Handle toolcache errors with StartProxyError
This commit is contained in:
Generated
+12
-1
@@ -119796,6 +119796,16 @@ async function extractProxy(logger, archive) {
|
||||
throw new StartProxyError("Failed to extract proxy archive." /* ExtractionFailed */);
|
||||
}
|
||||
}
|
||||
async function cacheProxy(logger, path2, filename, version) {
|
||||
try {
|
||||
return await toolcache.cacheDir(path2, filename, version);
|
||||
} catch (error3) {
|
||||
logger.error(
|
||||
`Failed to add proxy archive from ${path2} to toolcache: ${getErrorMessage(error3)}`
|
||||
);
|
||||
throw new StartProxyError("Failed to add proxy to toolcache" /* CacheFailed */);
|
||||
}
|
||||
}
|
||||
|
||||
// src/start-proxy-action.ts
|
||||
var KEY_SIZE = 2048;
|
||||
@@ -119960,7 +119970,8 @@ async function getProxyBinaryPath(logger) {
|
||||
);
|
||||
const temp = await downloadProxy(logger, proxyInfo.url, authorization);
|
||||
const extracted = await extractProxy(logger, temp);
|
||||
proxyBin = await toolcache2.cacheDir(
|
||||
proxyBin = await cacheProxy(
|
||||
logger,
|
||||
extracted,
|
||||
proxyFileName,
|
||||
proxyInfo.version
|
||||
|
||||
Reference in New Issue
Block a user