Skip to content

Commit f2c1119

Browse files
committed
Actually fixes #97!
1 parent 1b66613 commit f2c1119

File tree

2 files changed

+8
-6
lines changed

2 files changed

+8
-6
lines changed

lib/pip.js

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,13 @@ function installRequirements() {
1818

1919
this.serverless.cli.log(`Installing required Python packages with ${this.options.pythonBin}...`);
2020

21+
// In case the requirements file is a symlink, copy it to .serverless/requirements.txt
22+
// if using docker to avoid errors
23+
if (this.options.dockerizePip && fileName !== dotSlsReqs) {
24+
fse.copySync(fileName, dotSlsReqs);
25+
fileName = dotSlsReqs;
26+
}
27+
2128
let cmd;
2229
let options;
2330
const pipCmd = [
@@ -39,11 +46,6 @@ function installRequirements() {
3946
pipCmd.push('--system');
4047
}
4148
if (this.options.dockerizePip) {
42-
// In case the requirements file is a symlink, copy it to .serverless/requirements.txt
43-
if (fileName !== dotSlsReqs) {
44-
fse.copySync(fileName, dotSlsReqs);
45-
fileName = dotSlsReqs;
46-
}
4749
cmd = 'docker';
4850

4951
this.serverless.cli.log(`Docker Image: ${this.options.dockerImage}`);

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "serverless-python-requirements",
3-
"version": "3.0.8",
3+
"version": "3.0.9",
44
"engines": {
55
"node": ">=6.0"
66
},

0 commit comments

Comments
 (0)