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

When deploy_arn is not defined in the Gruntfile the value is undefined #60

Closed

Conversation

procedurallygenerated
Copy link

I use the FunctionName to deploy the code. The deploy_arn is undefined for me at this point.

Why don't we just check if the the deploy_arn is true. It cannot be 0, "", null or undefined anyway.

@Tim-B
Copy link
Owner

Tim-B commented Jan 23, 2016

Hi Varun, thanks for the pull request!

Does this cause a bug of some sort? I don't think 0, "" or null are valid ARNs, so would it be best to fall back to FunctionName in those cases?

@procedurallygenerated
Copy link
Author

That's right. My Gruntfile currently looks like this,

lambda_deploy: {
  default: {
    function: '<name>'
  }
}

Since the deploy_arn is not set in the grunt file the value of deploy_arn is undefined when it arrives at this check. Currently the code only checks for the value being null. Since undefined !== null both the deploy_arn and deploy_function get set to undefined and the deploy fails.

Switching the check to fails on all false values fixes this issue.

@Tim-B
Copy link
Owner

Tim-B commented Feb 14, 2016

Thanks for reporting this issue, it will be fixed in the next release.

I've also added unit tests to validate this use case.

@Tim-B Tim-B closed this Feb 14, 2016
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.

None yet

2 participants