Skip to content

Verify env vars before create sample files - #99

Merged
DeviaVir merged 2 commits into
motdotla:masterfrom
tallesh:respect_env_file
May 12, 2016
Merged

Verify env vars before create sample files#99
DeviaVir merged 2 commits into
motdotla:masterfrom
tallesh:respect_env_file

Conversation

@tallesh

@tallesh tallesh commented May 7, 2016

Copy link
Copy Markdown
Contributor

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

DeviaVir commented May 8, 2016

Copy link
Copy Markdown
Collaborator

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

@tallesh

tallesh commented May 9, 2016

Copy link
Copy Markdown
Contributor Author

@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
Copy Markdown
Collaborator

+1 thanks @tallesh

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

Copy link
Copy Markdown
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

tallesh commented May 12, 2016

Copy link
Copy Markdown
Contributor Author

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