From d15a90a9f6bcdd9d63eef6ca97c3bd736271cc5e Mon Sep 17 00:00:00 2001
From: FSuman <felipe.suman@gmail.com>
Date: Fri, 5 Nov 2021 11:10:11 -0400
Subject: [PATCH] feat(poetry): Use single poetry update command (#12504)

Co-authored-by: Felipe Suman <felipe.suman@points.com>
Co-authored-by: Michael Kriese <michael.kriese@visualon.de>
---
 lib/manager/poetry/artifacts.ts | 9 +++++----
 1 file changed, 5 insertions(+), 4 deletions(-)

diff --git a/lib/manager/poetry/artifacts.ts b/lib/manager/poetry/artifacts.ts
index 8abd999b9d..fc541b4e31 100644
--- a/lib/manager/poetry/artifacts.ts
+++ b/lib/manager/poetry/artifacts.ts
@@ -117,10 +117,11 @@ export async function updateArtifacts({
       await deleteLocalFile(lockFileName);
       cmd.push('poetry update --lock --no-interaction');
     } else {
-      for (let i = 0; i < updatedDeps.length; i += 1) {
-        const dep = updatedDeps[i];
-        cmd.push(`poetry update --lock --no-interaction ${quote(dep.depName)}`);
-      }
+      cmd.push(
+        `poetry update --lock --no-interaction ${updatedDeps
+          .map((dep) => quote(dep.depName))
+          .join(' ')}`
+      );
     }
     const tagConstraint = getPythonConstraint(existingLockFileContent, config);
     const poetryRequirement = config.constraints?.poetry || 'poetry';
-- 
GitLab