File tree 1 file changed +7
-1
lines changed
1 file changed +7
-1
lines changed Original file line number Diff line number Diff line change @@ -7,9 +7,10 @@ const {spawnSync} = require('child_process');
7
7
* @return {Promise }
8
8
*/
9
9
function installRequirements ( ) {
10
+ const dotSlsReqs = '.serverless/requirements.txt' ;
10
11
let fileName = this . options . fileName ;
11
12
if ( this . options . usePipenv && fse . existsSync ( path . join ( this . servicePath , 'Pipfile' ) ) ) {
12
- fileName = '.serverless/requirements.txt' ;
13
+ fileName = dotSlsReqs ;
13
14
}
14
15
15
16
if ( ! fse . existsSync ( path . join ( this . servicePath , fileName ) ) )
@@ -38,6 +39,11 @@ function installRequirements() {
38
39
pipCmd . push ( '--system' ) ;
39
40
}
40
41
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
+ }
41
47
cmd = 'docker' ;
42
48
43
49
this . serverless . cli . log ( `Docker Image: ${ this . options . dockerImage } ` ) ;
You can’t perform that action at this time.
0 commit comments