geeklearningio / gl-vsts-tasks-yarn

Yarn Package Manager Visual Studio Team Services Build and Release Management extensions
MIT License
52 stars 18 forks source link

Update Proxy Support to respect Azure DevOps upper case variable names #72

Closed FatalMerlin closed 4 years ago

FatalMerlin commented 4 years ago

Hi all,

I found that #65 does in fact not work in Azure DevOps Pipelines. (Re-)Fixes #59.

As stated by the PR creator

I did not try to run it via Azure DevOps.

Azure DevOps transforms all variables to uppercase, so we have to check for uppercase proxy variables.

See here (StackOverflow) and here (VS Developer Community).

Additionally I added a check for undefined, since undefined process.env.VARIABLE is, well undefined:

$ node
> process.env.http_proxy
'http://127.0.0.1:3128/'
> process.env.obviously_undefined_env_var //
undefined
> 
FatalMerlin commented 4 years ago

This might be relevant to you @sandorfr

sandorfr commented 4 years ago

thanks