Skip to content

Commit 6f4dc94

Browse files
committed
default the compatible runtimes to the provider runtime. (If its undefined, serverless core will remove it when creating the layer.)
1 parent 6f32335 commit 6f4dc94

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

lib/layer.js

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,8 @@ function createLayers() {
5757
this.serverless.service.layers['pythonRequirements'] = Object.assign({
5858
artifact: path.join('.serverless', 'pythonRequirements.zip'),
5959
name: `${this.serverless.service.stage}-python-requirements`,
60-
description: 'Python requirements generated by serverless-python-requirements.'
60+
description: 'Python requirements generated by serverless-python-requirements.',
61+
compatibleRuntimes: [this.serverless.service.provider.runtime],
6162
},
6263
this.options.layer
6364
);

0 commit comments

Comments
 (0)