Skip to content

Commit d0a89c0

Browse files
authored
fix noDeploy
serverless#146 already takes care of this, but we need proper noDeploy here again in case a white-listed package is dependent on a black-listed package
1 parent 4d45860 commit d0a89c0

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

lib/inject.js

+4-2
Original file line numberDiff line numberDiff line change
@@ -21,12 +21,14 @@ function injectRequirements(requirementsPath, packagePath, options) {
2121
if (file.endsWith('/')) {
2222
return;
2323
}
24+
25+
const relativeFile = path.relative(requirementsPath, file);
2426

25-
if (noDeploy.has(file.split(/[-\\\/]/, 1)[0])) {
27+
if (noDeploy.has(relativeFile.split(/[-\\\/]/, 1)[0])) {
2628
return;
2729
}
2830

29-
zip.file(path.relative(requirementsPath, file), fse.readFileSync(file), {
31+
zip.file(relativeFile, fse.readFileSync(file), {
3032
date: new Date(0), // necessary to get the same hash when zipping the same content
3133
});
3234
});

0 commit comments

Comments
 (0)