kevva / download

Download and extract files
MIT License
1.28k stars 199 forks source link

Default value for rejectUnauthorized is always true #183

Open vmdominguez-usaa opened 5 years ago

vmdominguez-usaa commented 5 years ago

if the rejectUnauthorized option is not given, the default value is determined by the expression

process.env.npm_config_strict_ssl !== 'false'

However, the value of process.env.npm_config_strict_ssl is only ever 'true' or '' (the empty string). It appears that npm will never set this environment variable to 'false', even when you set --strict-ssl=false.

The particular side effect that I am experiencing is that a transitive dependency of my project is using this package to download a binary file as part of a postinstall, and because --strict-ssl=false is not effectively honored in the postinstall, my npm install is failing.