Skip to content

Commit

Permalink
Merge 4919bec into 9f30db6
Browse files Browse the repository at this point in the history
  • Loading branch information
neverendingqs committed Feb 21, 2021
2 parents 9f30db6 + 4919bec commit 8e7b753
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 1 deletion.
2 changes: 1 addition & 1 deletion src/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -119,7 +119,7 @@ class ServerlessPlugin {
const exclude = (this.config && this.config.exclude) || []

if (include.length > 0) {
if (exclude) {
if (exclude.length > 0) {
this.log('DOTENV (WARNING): if "include" is set, "exclude" is ignored.')
}

Expand Down
4 changes: 4 additions & 0 deletions test/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -455,6 +455,10 @@ describe('ServerlessPlugin', function () {
this.serverless.service.provider.environment.should.deep.equal({
env2: envVars.env2,
})

this.serverless.cli.log.should.have.not.been.calledWith(
sinon.match(/exclude/),
)
})

it('removes keys in config.exclude', function () {
Expand Down

0 comments on commit 8e7b753

Please sign in to comment.