rabbah commented on a change in pull request #143: Export activation arguments
to environment during initialization.
URL:
https://github.com/apache/openwhisk-runtime-nodejs/pull/143#discussion_r319030530
##########
File path: core/nodejsActionBase/src/service.js
##########
@@ -160,6 +160,17 @@ function NodeActionService(config) {
};
function doInit(message) {
+ if (message.env && typeof message.env == 'object') {
+ Object.keys(message.env).forEach(k => {
+ let val = message.env[k];
+ if (typeof val !== 'object' || val == null) {
+ process.env[k] = val ? val.toString() : "";
+ } else {
+ process.env[k] = JSON.stringify(val);
Review comment:
Yep - opted to leave it in as defensive code anyway.
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
[email protected]
With regards,
Apache Git Services