{"action":"created","issue":{"url":"https://api.github.com/repos/elastic-coders/serverless-webpack/issues/156","repository_url":"https://api.github.com/repos/elastic-coders/serverless-webpack","labels_url":"https://api.github.com/repos/elastic-coders/serverless-webpack/issues/156/labels{/name}","comments_url":"https://api.github.com/repos/elastic-coders/serverless-webpack/issues/156/comments","events_url":"https://api.github.com/repos/elastic-coders/serverless-webpack/issues/156/events","html_url":"https://github.com/elastic-coders/serverless-webpack/pull/156","id":243182098,"number":156,"title":"Make processed input path absolute","user":{"login":"benjaminwood","id":1232531,"avatar_url":"https://avatars7.githubusercontent.com/u/1232531?v=4","gravatar_id":"","url":"https://api.github.com/users/benjaminwood","html_url":"https://github.com/benjaminwood","followers_url":"https://api.github.com/users/benjaminwood/followers","following_url":"https://api.github.com/users/benjaminwood/following{/other_user}","gists_url":"https://api.github.com/users/benjaminwood/gists{/gist_id}","starred_url":"https://api.github.com/users/benjaminwood/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/benjaminwood/subscriptions","organizations_url":"https://api.github.com/users/benjaminwood/orgs","repos_url":"https://api.github.com/users/benjaminwood/repos","events_url":"https://api.github.com/users/benjaminwood/events{/privacy}","received_events_url":"https://api.github.com/users/benjaminwood/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":1,"created_at":"2017-07-15T15:31:53Z","updated_at":"2017-07-15T16:21:56Z","closed_at":null,"pull_request":{"url":"https://api.github.com/repos/elastic-coders/serverless-webpack/pulls/156","html_url":"https://github.com/elastic-coders/serverless-webpack/pull/156","diff_url":"https://github.com/elastic-coders/serverless-webpack/pull/156.diff","patch_url":"https://github.com/elastic-coders/serverless-webpack/pull/156.patch"},"body":"## What did you implement:\r\n\r\nRelated: #151\r\n\r\nWhen using the invoke local command with the --path (-p) flag, relative file paths will not be found because serverless will end up looking in the build directory later on. So, this PR ensures that the path is absolute, ensuring it will be found, even if the path was relative.\r\n\r\n## How did you implement it:\r\n\r\nI added a function in utils.js that gets the --path option if present. It then uses `path.resolve` to resolve it, then assigns it back to serverless config.\r\n\r\n## How can we verify it:\r\n\r\nJust use `invoke local` with the --path option:\r\n\r\n`serverless invoke local -f function_name --path data.json`\r\n\r\n## Todos:\r\n\r\n- [ ] Write tests\r\n- [ ] Write documentation\r\n- Fix linting errors (not yet implemented)\r\n- Make sure code coverage hasn't dropped (not yet implemented)\r\n- [ ] Provide verification config / commands / resources\r\n- [x] Enable \"Allow edits from maintainers\" for this PR\r\n- [ ] Update the messages below\r\n\r\n***Is this ready for review?:*** NO\r\n***Is it a breaking change?:*** NO\r\n"},"comment":{"url":"https://api.github.com/repos/elastic-coders/serverless-webpack/issues/comments/315545017","html_url":"https://github.com/elastic-coders/serverless-webpack/pull/156#issuecomment-315545017","issue_url":"https://api.github.com/repos/elastic-coders/serverless-webpack/issues/156","id":315545017,"user":{"login":"HyperBrain","id":5524702,"avatar_url":"https://avatars7.githubusercontent.com/u/5524702?v=4","gravatar_id":"","url":"https://api.github.com/users/HyperBrain","html_url":"https://github.com/HyperBrain","followers_url":"https://api.github.com/users/HyperBrain/followers","following_url":"https://api.github.com/users/HyperBrain/following{/other_user}","gists_url":"https://api.github.com/users/HyperBrain/gists{/gist_id}","starred_url":"https://api.github.com/users/HyperBrain/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/HyperBrain/subscriptions","organizations_url":"https://api.github.com/users/HyperBrain/orgs","repos_url":"https://api.github.com/users/HyperBrain/repos","events_url":"https://api.github.com/users/HyperBrain/events{/privacy}","received_events_url":"https://api.github.com/users/HyperBrain/received_events","type":"User","site_admin":false},"created_at":"2017-07-15T16:21:56Z","updated_at":"2017-07-15T16:21:56Z","body":"Yes, agree. `makeProcessedInputPathAbsolutePath` is not an utility function. It is a execution building block needed to execute `invoke local`. So an own file would be the best solution."}}
{"actor":{"display_login":"HyperBrain"}}