Skip to content

Commit

Permalink
Performance fix, swap warning to error.
Browse files Browse the repository at this point in the history
  • Loading branch information
chadac committed Jun 13, 2022
1 parent b89e167 commit 3568484
Showing 1 changed file with 6 additions and 5 deletions.
11 changes: 6 additions & 5 deletions src/poetry/console/commands/install.py
Original file line number Diff line number Diff line change
Expand Up @@ -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(
"<warning>The `<fg=yellow;options=bold>--with</>`,"
"<error>The `<fg=yellow;options=bold>--with</>`,"
" `<fg=yellow;options=bold>--without</>` and"
" `<fg=yellow;options=bold>--only</>` options are ignored when used"
" along with the `<fg=yellow;options=bold>--only-root</>`"
" option.</warning>"
" `<fg=yellow;options=bold>--only</>` options cannot be used with"
" the `<fg=yellow;options=bold>--only-root</>`"
" option.</error>"
)
return 1

if self.option("only-root") and self.option("no-root"):
self.line_error(
Expand Down

0 comments on commit 3568484

Please sign in to comment.