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

set env vars from --env last in invoke local #5565

Merged
merged 2 commits into from Dec 5, 2018

Conversation

Projects
None yet
2 participants
@dschep
Copy link
Member

dschep commented Dec 5, 2018

What did you implement:

fixes #5563

How did you implement it:

call invoke local's env var setting code before invoke's env var setting code (which is what handles the --env option)

How can we verify it:

serverless.yml:

service: test
provider:
  name: aws
  runtime: nodejs8.10
functions:
  test:
    handler: handler.test
    environment:
      FOOBAR=foo

handler.js:

module.exports.test = () => process.env.foobar

then

sls invoke -f hello --env FOOBAR=bar

with master will print foo with this branch will print bar

Todos:

  • Write tests
  • Write documentation
  • Fix linting errors
  • Make sure code coverage hasn't dropped
  • Provide verification config / commands / resources
  • Enable "Allow edits from maintainers" for this PR
  • Update the messages below

Is this ready for review?: YES
Is it a breaking change?: NO

@dschep dschep self-assigned this Dec 5, 2018

@dschep dschep requested review from eahefnawy and pmuens Dec 5, 2018

@alexdebrie
Copy link
Contributor

alexdebrie left a comment

LGTM!

@dschep dschep merged commit fa4ef11 into master Dec 5, 2018

4 checks passed

continuous-integration/appveyor/branch AppVeyor build succeeded
Details
continuous-integration/appveyor/pr AppVeyor build succeeded
Details
continuous-integration/travis-ci/pr The Travis CI build passed
Details
continuous-integration/travis-ci/push The Travis CI build passed
Details

@dschep dschep deleted the sls-5563 branch Dec 5, 2018

@dschep dschep referenced this pull request Dec 12, 2018

Merged

v1.35.0 release! #5592

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment