New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
fix(cli): Respect NO_PROXY on cypress download #17702
fix(cli): Respect NO_PROXY on cypress download #17702
Conversation
Thanks for taking the time to open a PR!
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thank you for opening a PR.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I added a commit to add proxy-from-env@1.0.0
to package.json
.
Also, can you please open a PR in cypress-documentation
to enhance the install docs with this information? This would be a good place: https://github.com/cypress-io/cypress-documentation/blob/master/content/guides/getting-started/installing-cypress.md
Once that's done this looks good to me.
Thank you @flotwig |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thank you for the contribution @westarne
* develop: fix(cli): Respect NO_PROXY on cypress download (cypress-io#17702) chore: Update Chrome (beta) to 94.0.4606.50 (cypress-io#18117) release 8.4.1 [skip ci] fix: GH env variable for test other projects (cypress-io#18147) fix(open_project): remove unnecessary fn wrapping from tryToCalls (cypress-io#18146)
…/remove-decorators * unified-desktop-gui: fixing broken ct tests fix types remove old code chore: bump deps (#18213) feat(app): icon library supporting Cy's custom icons (#18195) feat(app): adding navigation, pages, router, and layout (#18194) chore: Update Chrome (stable) to 94.0.4606.54 (#18196) chore: bump yarn.lock (#18204) chore(tests): fix flake in net stubbing/xhr/proxy logging tests (#18163) chore: Update Chrome (beta) to 94.0.4606.54 (#18174) fix: add deprecation notice for win 32-bit (#18130) chore: fix broken firefox focus tests, bump resource class of chrome-beta job (#18133) fix(cli): Respect NO_PROXY on cypress download (#17702) chore: Update Chrome (beta) to 94.0.4606.50 (#18117) release 8.4.1 [skip ci] fix: GH env variable for test other projects (#18147) fix(open_project): remove unnecessary fn wrapping from tryToCalls (#18146) change @ts-expect-error -> @ts-ignore (#18047)
Released in This comment thread has been locked. If you are still experiencing this issue after upgrading to |
User facing changelog
As stated in the open issue, the download of cypress did not support the
NO_PROXY
environment variable and thus always used a proxy. This PR fixes that behaviour by adding an explicit NO_PROXY lookup. This change is based on https://github.com/cypress-io/request/blob/master/lib/getProxyFromURI.js.Additional details
I've selected this approach to still explicitly hand in the proxy to the
request
module, because in there the variablesnpm_config_proxy
andnpm_config_https_proxy
are ignored to determine the proxy.As alternative stated in #6304 (comment) it would also be possible to leave out the
proxy
parameter when executing therequest
as it will be determined in there. But as mentioned this would not respect the npm config properties.How has the user experience changed?
npm install cypress
now works if a proxy is set but not used for cypress.PR Tasks