Skip to content

Conversation

@LitoMore
Copy link
Contributor

@LitoMore LitoMore commented Jul 1, 2019

Resolve #616
Fix #620

@SBoudrias SBoudrias merged commit c49a47d into yeoman:master Jul 1, 2019
@SBoudrias
Copy link
Member

Woot I'll cut a release soon!

@LitoMore LitoMore deleted the fix-proxy branch July 1, 2019 08:12

if (MAJOR_NODEJS_VERSION >= 10) {
// `global-agent` works with Node.js v10 and above.
require('global-agent').bootstrap();
Copy link

@gajus gajus Jul 1, 2019

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If you are not using global variables, then using createGlobalProxyAgent would be more appropriate, because it does not pollute the global namespace.

You might also want to configure environmentVariableNamespace to allow users use unprefixed HTTP_PROXY(S) variables.

@tristanwagner
Copy link

with yo using global-agent I can't define a custom https agent unless I specify the env variable GLOBAL_AGENT_FORCE_GLOBAL_AGENT=false which is kinda annoying to be honest

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

TypeError: Cannot read property 'proxy' of undefined Fix using yo behind a proxy on Node versions >= 11.6.0

4 participants