diff --git a/src/input.ts b/src/input.ts index 411dcfc2..2abbc140 100644 --- a/src/input.ts +++ b/src/input.ts @@ -58,8 +58,15 @@ export function getInputs(): Inputs { const proxyPort = 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: Inputs = { diff --git a/src/main.ts b/src/main.ts index 20b66093..d45d5a55 100644 --- a/src/main.ts +++ b/src/main.ts @@ -27,6 +27,8 @@ async function run() { function wrapWebhook(webhook: string, payload: Object): Promise { return async function() { try { + logInfo(process.env['http_proxy'] || process.env['HTTP_PROXY'] || 'no http proxy setted') + logInfo(process.env['https_proxy'] || process.env['HTTPS_PROXY'] || 'no https proxy setted') await axios.post(webhook, payload) } catch(e: any) { if (e.response) {