Add proxy settings to the windows script

This commit is contained in:
Zachary Eisinger 2020-07-16 15:43:32 -07:00
parent fe82455c0b
commit f87d15e234
2 changed files with 14 additions and 0 deletions

7
dist/index.js vendored
View File

@ -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 = {

View File

@ -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);