-
-
Notifications
You must be signed in to change notification settings - Fork 40
Description
I have a project that has added https-localhost as a dependency. We have a Jenkins continuous integration server that checks out our code from git and then installs the npm modules so that it can build our app. After the npm modules are installed, the postinstall script for https-localhost runs and it generates the certificates but then get prompted to enter a password. I was wondering how other people handle this situation. I know I could pass the --ignore-scripts flag to npm but that ignores all post-install scripts and I cannot do that.
> https-localhost@3.1.2 postinstall /opt/node/myapp/node_modules/https-localhost
> node cert/generate.js
Generating certificates...
Downloading the mkcert executable...
Running mkcert to generate certificates...
[sudo] password for appuser:
You could possibly check for an environment variable and then if present skip the postinstall.
https-localhost_skip_postintall="yes" npm install
Then cert/generate.js would have to updated to check for the https-localhost_skip_postinstall environment variable and not generate the certificates.