I've been using environment variables to store credentials in flows and groups and would like to easily pass them to a executed process without exposing them on the command line. Adding them to the process environment let me accomplish this.
Editing 90-exec.js I've naively inserted the following after line 143[1]
if (typeof msg?.env == "object") node.execOpt.env = msg.env;
and after line 93[2]
if (typeof msg?.env == "object") opts.env = msg.env;
to accomplish this. I'm not a developer but would be interested in adding this to the core node if the maintainers will take a PR. Currently this code naively changes the default behavior of the exec node so I may add an additional setting in the node configuration GUI to disable this behavior or select a different message object. If that would make merging this feature more feasible I am willing to add to the GUI.
Thanks for your consideration,
Nathan