diff --git a/lib/input.js b/lib/input.js index 6b848113..781453b1 100644 --- a/lib/input.js +++ b/lib/input.js @@ -51,8 +51,15 @@ function getInputs() { const proxyHost = core.getInput('proxyHost', { required: false, trimWhitespace: true }); const proxyPort = utils_1.asNumber(core.getInput('proxyPort', { required: false, trimWhitespace: true })); if (proxyHost && proxyPort) { - process.env['http_proxy'] = `http://${proxyHost}:${proxyPort}`; - process.env['https_proxy'] = `http://${proxyHost}:${proxyPort}`; + delete process.env['http_proxy']; + delete process.env['https_proxy']; + delete process.env['HTTP_PROXY']; + delete process.env['HTTPS_PROXY']; + const proxy = `http://${proxyHost}:${proxyPort}`; + process.env['http_proxy'] = proxy; + process.env['https_proxy'] = proxy; + process.env['HTTP_PROXY'] = proxy; + process.env['HTTPS_PROXY'] = proxy; } const inputs = { webhooks: webhooks, diff --git a/lib/main.js b/lib/main.js index e606dbd5..143e8687 100644 --- a/lib/main.js +++ b/lib/main.js @@ -61,6 +61,8 @@ function wrapWebhook(webhook, payload) { return function () { return __awaiter(this, void 0, void 0, function* () { try { + utils_1.logInfo(process.env['http_proxy'] || process.env['HTTP_PROXY'] || 'no http proxy setted'); + utils_1.logInfo(process.env['https_proxy'] || process.env['HTTPS_PROXY'] || 'no https proxy setted'); yield axios_1.default.post(webhook, payload); } catch (e) {