Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Verify env vars before create sample files #99

Merged
merged 2 commits into from
May 12, 2016

Conversation

tallesh
Copy link
Contributor

@tallesh tallesh commented May 7, 2016

This patch force node-lambda first look into env vars before create sampleFiles (context.json and event.json)

Previously, every time node-lambda run was executed, a event.json file was created even if the -j parameter was informed, for example after execute:

node-lambda run --handler test.handler -j test.json

The event.json file would be unnecessarily created and the test.json file would not be created. The same logic occurs if the EVENT_FILE var was defined.

To correct it, this code force node-lambda first look into env vars before create sampleFiles (context.json and event.json).

@DeviaVir
Copy link
Collaborator

DeviaVir commented May 8, 2016

@tallesh thanks for your contribution! Would you mind adding tests demonstrating it is now working correctly?

@tallesh
Copy link
Contributor Author

tallesh commented May 9, 2016

@DeviaVir sure! I don't master javascript tests, but I will do some cases and commit again. Feel free for make comments and suggestions on my commits.

@DeviaVir
Copy link
Collaborator

+1 thanks @tallesh

@DeviaVir DeviaVir merged commit a59be77 into motdotla:master May 12, 2016
@DeviaVir
Copy link
Collaborator

This has been added to 0.8.2 which has been released on NPM as the latest version, thanks again for your contribution! 🎊

@tallesh
Copy link
Contributor Author

tallesh commented May 12, 2016

Great! :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants