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

functionName results in true name when function name contains -no- #408

Closed
MartinNuc opened this issue Jan 12, 2018 · 0 comments
Closed
Labels

Comments

@MartinNuc
Copy link
Contributor

I wanted to create a function using env var AWS_FUNCTION_NAME=header-no-cache but that results in a function name called true.

I digged in and found that node-lambda uses commander.js like this:

.option('-n, --functionName [' + AWS_FUNCTION_NAME + ']', 'Lambda FunctionName', AWS_FUNCTION_NAME)

That results in flag (the 1st argument for option): -n, --functionName [header-no-cache]

Notice the name of my function in flag configuration. Instead of header-no-cache there should be something like functionName.

The problem is that thanks to -no- string in the flag configuration commander.js thinks that it's a boolean parameter with default value true.

Solution is not to include input from env vars to the flag definition.

... and PR is coming 🤞

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

No branches or pull requests

2 participants