From 72607214a669bcb02acc7a382cc69afdbca3ddce Mon Sep 17 00:00:00 2001 From: finswimmer Date: Sat, 15 Oct 2022 22:42:16 +0200 Subject: [PATCH] feat(cli): added warning about ignoring --project when trying to apply `new` command --- src/poetry/console/commands/new.py | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/src/poetry/console/commands/new.py b/src/poetry/console/commands/new.py index cde571aa202..2ef2df00117 100644 --- a/src/poetry/console/commands/new.py +++ b/src/poetry/console/commands/new.py @@ -34,6 +34,13 @@ def handle(self) -> int: from poetry.layouts import layout from poetry.utils.env import SystemEnv + if self.io.input.option("project"): + self.line_error( + "--project can only be used on existing projects. Poetry will" + " ignore this option. Use --path instead to define the path to create" + " the project at." + ) + if self.option("src"): layout_cls = layout("src") else: