Skip to content

Commit 3b0b2ff

Browse files
committed
fix: use absolute paths to ensure compatibility with v4 Compose
1 parent 57f7c6b commit 3b0b2ff

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

Diff for: lib/inject.js

+2-2
Original file line numberDiff line numberDiff line change
@@ -153,15 +153,15 @@ async function injectAllRequirements(funcArtifact) {
153153
return this.options.zip
154154
? func
155155
: injectRequirements(
156-
path.join('.serverless', func.module, 'requirements'),
156+
path.join(this.serverless.serviceDir, '.serverless', func.module, 'requirements'),
157157
func.package.artifact,
158158
injectionRelativePath,
159159
this.options
160160
);
161161
});
162162
} else if (!this.options.zip) {
163163
await injectRequirements(
164-
path.join('.serverless', 'requirements'),
164+
path.join(this.serverless.serviceDir, '.serverless', 'requirements'),
165165
this.serverless.service.package.artifact || funcArtifact,
166166
injectionRelativePath,
167167
this.options

0 commit comments

Comments
 (0)