Skip to content

Commit 9750662

Browse files
committed
Fix for works with old and new versions
1 parent 835ef2f commit 9750662

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

lib/poetry.js

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,11 @@ function pyprojectTomlToRequirements() {
3535

3636
const editableFlag = new RegExp(/^-e /gm);
3737
const sourceRequirements = path.join(this.servicePath, 'requirements.txt');
38-
const requirementsContents = res.stdout.toString();
38+
const requirementsContents =
39+
res.stdout.toString() ||
40+
fse.readFileSync(sourceRequirements, {
41+
encoding: 'utf-8'
42+
});
3943

4044
if (requirementsContents.match(editableFlag)) {
4145
this.serverless.cli.log(

0 commit comments

Comments
 (0)