Skip to content

Commit

Permalink
fix: ignore non-nodejs functions
Browse files Browse the repository at this point in the history
  • Loading branch information
sergioramos committed Apr 9, 2021
1 parent 68b1ff3 commit 39bf104
Showing 1 changed file with 10 additions and 2 deletions.
12 changes: 10 additions & 2 deletions index.js
Original file line number Diff line number Diff line change
Expand Up @@ -395,11 +395,19 @@ module.exports = class {
});
}

async resolveFilePathsFunction(fnName) {
async resolveFilePathsFunction(fnName, ...args) {
const { service } = this.serverless;
const { package: pkg = {}, handler } = service.getFunction(fnName);
const { package: pkg = {}, handler, runtime } = service.getFunction(fnName);
const { include = [], exclude = [] } = pkg;

if (runtime && !/^nodejs/.test(runtime)) {
return packageService.resolveFilePathsFunction.call(
this,
fnName,
...args,
);
}

const { excludes, includes } = await Parallel({
excludes: async () => this.getExcludes(exclude, true),
includes: async () => this.getIncludes(include),
Expand Down

0 comments on commit 39bf104

Please sign in to comment.