-
Notifications
You must be signed in to change notification settings - Fork 3.3k
Description
Current behavior
When developing, it is very convenient to have a repository-defined .npmrc file with all the custom options. We use self-signed certificates for the binary repository mirror which we have set via cypress_download_mirror in the .npmrc. We also have cafile set to our root certificate file and use that when running npm install and such.
When running npm install cypress - the https://github.com/cypress-io/cypress/blob/develop/cli/lib/tasks/download.js ignores the cafile configuration even if it exists and only takes the environment configuration.
A workaround is to set the NODE_EXTRA_CA_CERTS variable, but that is a global solution and we might have several separate cafiles for different projects.
Desired behavior
https://github.com/cypress-io/cypress/blob/develop/cli/lib/tasks/download.js should honor the cafile configuration and use the specified certificate if it is set in the .npmrc configuration when it is being run.
Test code to reproduce
Not easy to reproduce via a singular repo (requires self-signed certificates and registries). Will try to do it if needed.