Use password stored in an environmental variable
I've had a difficult time integrating this module into some continuous delivery pipelines like PM2 because for some reason (I really don't know why) piping a password using echo (echo 'my_pass' | npm run encrypt) doesn't work in the isolated environments set up to build and deploy code.
To get around this, I've added support for a single flag --PW to which you pass the name of an environmental variable set to a desired password.
Example use in package.json: encrypt: encrypt config.json config.json.cast5 --PW=ENV_VAR
This by-passes manual password entry from stdin and instead uses the value found at the --PW environmental variable, if it exits. If the environmental variable is not set, the command exits with exit status 1.
awesome, please merge this ;)
FYI, I just submitted a similar PR #8 that adds support for passing the password as a command line argument (I did it before noticing this existing PR).