From f0fab0e6ec6be238c1630074048ed981ca4d51e0 Mon Sep 17 00:00:00 2001 From: Thomas Pansino Date: Mon, 26 Aug 2019 18:44:21 -0700 Subject: [PATCH 1/2] Overwrite existing requirements.txt file when generating from poetry --- lib/poetry.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/lib/poetry.js b/lib/poetry.js index ddf85201..48589640 100644 --- a/lib/poetry.js +++ b/lib/poetry.js @@ -54,7 +54,8 @@ function pyprojectTomlToRequirements() { fse.ensureDirSync(path.join(this.servicePath, '.serverless')); fse.moveSync( sourceRequirements, - path.join(this.servicePath, '.serverless', 'requirements.txt') + path.join(this.servicePath, '.serverless', 'requirements.txt'), + { "overwrite": true } ); } From 5b38b5c817039a7b89b5987be423506cabc56580 Mon Sep 17 00:00:00 2001 From: Tom Pansino Date: Wed, 28 Aug 2019 17:00:34 -0700 Subject: [PATCH 2/2] Update misleading message wording --- lib/poetry.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/poetry.js b/lib/poetry.js index 48589640..8ce00bda 100644 --- a/lib/poetry.js +++ b/lib/poetry.js @@ -43,7 +43,7 @@ function pyprojectTomlToRequirements() { if (requirementsContents.match(editableFlag)) { this.serverless.cli.log( - 'The generated file contains -e lines, removing them...' + 'The generated file contains -e flags, removing them...' ); fse.writeFileSync( sourceRequirements,