mirror of
https://github.com/github/codeql-action.git
synced 2026-01-07 07:00:28 +08:00
Clean-up logic for overriding proxy
This commit is contained in:
@@ -202,15 +202,6 @@ async function run() {
|
||||
let didUploadTrapCaches = false;
|
||||
util.initializeEnvironment(actionsUtil.getActionVersion());
|
||||
|
||||
// Unset the CODEQL_PROXY_* environment variables, as they are not needed
|
||||
// and can cause issues with the CodeQL CLI
|
||||
// Check for CODEQL_PROXY_HOST: and if it is empty but set, unset it
|
||||
if (process.env.CODEQL_PROXY_HOST === "") {
|
||||
delete process.env.CODEQL_PROXY_HOST;
|
||||
delete process.env.CODEQL_PROXY_PORT;
|
||||
delete process.env.CODEQL_PROXY_CA_CERTIFICATE;
|
||||
}
|
||||
|
||||
// Make inputs accessible in the `post` step, details at
|
||||
// https://github.com/github/codeql-action/issues/2553
|
||||
actionsUtil.persistInputs();
|
||||
@@ -244,6 +235,16 @@ async function run() {
|
||||
);
|
||||
}
|
||||
|
||||
// Unset the CODEQL_PROXY_* environment variables, as they are not needed
|
||||
// and can cause issues with older CodeQL CLIs.
|
||||
// Check for CODEQL_PROXY_HOST: and if it is empty but set, unset it.
|
||||
if (process.env.CODEQL_PROXY_HOST === "" && !(await util.codeQlVersionAtLeast(codeql, "2.20.7"))) {
|
||||
delete process.env.CODEQL_PROXY_HOST;
|
||||
delete process.env.CODEQL_PROXY_PORT;
|
||||
delete process.env.CODEQL_PROXY_CA_CERTIFICATE;
|
||||
}
|
||||
|
||||
|
||||
const apiDetails = getApiDetails();
|
||||
const outputDir = actionsUtil.getRequiredInput("output");
|
||||
core.exportVariable(EnvVar.SARIF_RESULTS_OUTPUT_DIR, outputDir);
|
||||
|
||||
Reference in New Issue
Block a user