From 4e7b815f2ec98764220dd49b8fc7612fe2406441 Mon Sep 17 00:00:00 2001 From: Daniel Rice Date: Thu, 7 May 2020 22:31:01 -0600 Subject: [PATCH 1/2] Remove line associated with old poetry version --- lib/poetry.js | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/lib/poetry.js b/lib/poetry.js index 108f90dd..0607b9d2 100644 --- a/lib/poetry.js +++ b/lib/poetry.js @@ -42,11 +42,7 @@ function pyprojectTomlToRequirements() { const editableFlag = new RegExp(/^-e /gm); const sourceRequirements = path.join(this.servicePath, 'requirements.txt'); - const requirementsContents = - res.stdout.toString().trim() || // As of poetry 1.0.0b1, requirements.txt is printed to standard output when the -o option is not specified. - fse.readFileSync(sourceRequirements, { - encoding: 'utf-8' - }); + const requirementsContents = fse.readFileSync(sourceRequirements, { encoding: 'utf-8' }); if (requirementsContents.match(editableFlag)) { this.serverless.cli.log( From 0c33a6f180175a905ef0c549cf34c1f488b77583 Mon Sep 17 00:00:00 2001 From: Daniel Rice Date: Fri, 8 May 2020 08:27:54 -0600 Subject: [PATCH 2/2] prettier --- lib/poetry.js | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/lib/poetry.js b/lib/poetry.js index 0607b9d2..345224d3 100644 --- a/lib/poetry.js +++ b/lib/poetry.js @@ -42,7 +42,9 @@ function pyprojectTomlToRequirements() { const editableFlag = new RegExp(/^-e /gm); const sourceRequirements = path.join(this.servicePath, 'requirements.txt'); - const requirementsContents = fse.readFileSync(sourceRequirements, { encoding: 'utf-8' }); + const requirementsContents = fse.readFileSync(sourceRequirements, { + encoding: "utf-8" + }); if (requirementsContents.match(editableFlag)) { this.serverless.cli.log(