Skip to content

Commit 2a14d92

Browse files
author
Felipe Santos
committed
Fix problem zip individually
1 parent 569b7e4 commit 2a14d92

File tree

1 file changed

+10
-8
lines changed

1 file changed

+10
-8
lines changed

lib/inject.js

+10-8
Original file line numberDiff line numberDiff line change
@@ -75,7 +75,7 @@ function moveModuleUp(source, target, module) {
7575
function injectAllRequirements(funcArtifact) {
7676
this.serverless.cli.log('Injecting required Python packages to package...');
7777

78-
if (this.options.zip) {
78+
if (this.options.zip && !this.serverless.service.package.individually) {
7979
return;
8080
}
8181

@@ -107,13 +107,15 @@ function injectAllRequirements(funcArtifact) {
107107
return func;
108108
}
109109
})
110-
.map(func =>
111-
injectRequirements(
112-
path.join('.serverless', func.module, 'requirements'),
113-
func.package.artifact,
114-
this.options
115-
)
116-
);
110+
.map(func => {
111+
return this.options.zip
112+
? injectRequirements(
113+
path.join('.serverless', func.module, 'requirements'),
114+
func.package.artifact,
115+
this.options
116+
)
117+
: func
118+
});
117119
} else {
118120
return injectRequirements(
119121
path.join('.serverless', 'requirements'),

0 commit comments

Comments
 (0)