From 3568484c3629dd071792202f71bb67c156dbe29f Mon Sep 17 00:00:00 2001 From: Chad Crawford Date: Mon, 6 Jun 2022 13:15:13 -0700 Subject: [PATCH] Performance fix, swap warning to error. --- src/poetry/console/commands/install.py | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/src/poetry/console/commands/install.py b/src/poetry/console/commands/install.py index f8caf0b169d..c65a3225202 100644 --- a/src/poetry/console/commands/install.py +++ b/src/poetry/console/commands/install.py @@ -97,15 +97,16 @@ def handle(self) -> int: return 1 if self.option("only-root") and any( - [self.option(key) for key in {"with", "without", "only"}] + self.option(key) for key in {"with", "without", "only"} ): self.line_error( - "The `--with`," + "The `--with`," " `--without` and" - " `--only` options are ignored when used" - " along with the `--only-root`" - " option." + " `--only` options cannot be used with" + " the `--only-root`" + " option." ) + return 1 if self.option("only-root") and self.option("no-root"): self.line_error(