@@ -34,7 +34,8 @@ function installRequirements(requirementsPath, targetFolder, serverless, service
34
34
let cmdOptions ;
35
35
let pipCmd = [
36
36
options . pythonBin , '-m' , 'pip' , '--isolated' , 'install' ,
37
- '-t' , targetRequirementsFolder , '-r' , dotSlsReqs ,
37
+ '-t' , dockerPathForWin ( options , targetRequirementsFolder ) ,
38
+ '-r' , dockerPathForWin ( options , dotSlsReqs ) ,
38
39
...options . pipCmdExtraArgs ,
39
40
] ;
40
41
if ( ! options . dockerizePip ) {
@@ -117,7 +118,19 @@ function installRequirements(requirementsPath, targetFolder, serverless, service
117
118
} ;
118
119
119
120
/**
120
- * create a filtered requirements.txt without anything from noDeploy
121
+ * convert path from Windows style to Linux style, if needed
122
+ * @param {Object } options
123
+ * @param {string } path
124
+ * @return {string }
125
+ */
126
+ function dockerPathForWin ( options , path ) {
127
+ if ( process . platform === 'win32' && options . dockerizePip ) {
128
+ return path . replace ( '\\' , '/' ) ;
129
+ }
130
+ return path ;
131
+ }
132
+
133
+ /** create a filtered requirements.txt without anything from noDeploy
121
134
* @param {string } source requirements
122
135
* @param {string } target requirements where results are written
123
136
* @param {Object } options
0 commit comments