You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@openwhisk.apache.org by GitBox <gi...@apache.org> on 2018/06/28 23:07:40 UTC

[GitHub] csantanapr opened a new issue #67: When using package action the CWD should be the root of the extracted zip

csantanapr opened a new issue #67: When using package action the CWD should be the root of the extracted zip
URL: https://github.com/apache/incubator-openwhisk-runtime-nodejs/issues/67
 
 
   When using package action the CWD should be the root of the extracted zip
   
   Currently users need to use `__dirname` to reference a file inside they zip, this creates problems when developing local as usually the node process is started on the root of the nodejs module.
   
   The proposed solution is to apply same technique from the python package actions, for the proxy to change the current process CWD to be the root of the directory where the package action is extracted.
   
   The change should be done in this area to add `process.chdir()`:
   https://github.com/apache/incubator-openwhisk-runtime-nodejs/blob/master/core/nodejsActionBase/runner.js#L55
   ```javascript
   return unzipInTmpDir(message.code).then(function (moduleDir) {
      process.chdir(moduleDir)
   
   ``` 
   cc @eweiter 

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services