From f87d15e234d5f20547ecbb41285bb1688985ec8d Mon Sep 17 00:00:00 2001 From: Zachary Eisinger Date: Thu, 16 Jul 2020 15:43:32 -0700 Subject: [PATCH] Add proxy settings to the windows script --- dist/index.js | 7 +++++++ src/installer.ts | 7 +++++++ 2 files changed, 14 insertions(+) diff --git a/dist/index.js b/dist/index.js index d5f0142..1291ff9 100644 --- a/dist/index.js +++ b/dist/index.js @@ -16739,6 +16739,13 @@ class DotnetCoreInstaller { if (calculatedVersion) { command += ` -Version ${calculatedVersion}`; } + if (process.env['https_proxy'] != null) { + command += ` -ProxyAddress ${process.env['https_proxy']}`; + } + // This is not currently an option + if (process.env['no_proxy'] != null) { + command += ` -ProxyBypassList ${process.env['no_proxy']}`; + } // process.env must be explicitly passed in for DOTNET_INSTALL_DIR to be used const powershellPath = yield io.which('powershell', true); var options = { diff --git a/src/installer.ts b/src/installer.ts index d5d7242..9686f26 100644 --- a/src/installer.ts +++ b/src/installer.ts @@ -115,6 +115,13 @@ export class DotnetCoreInstaller { if (calculatedVersion) { command += ` -Version ${calculatedVersion}`; } + if (process.env['https_proxy'] != null) { + command += ` -ProxyAddress ${process.env['https_proxy']}`; + } + // This is not currently an option + if (process.env['no_proxy'] != null) { + command += ` -ProxyBypassList ${process.env['no_proxy']}`; + } // process.env must be explicitly passed in for DOTNET_INSTALL_DIR to be used const powershellPath = await io.which('powershell', true);