Skip to content

Commit

Permalink
feat(cli): added warning about ignoring --project when trying to appl…
Browse files Browse the repository at this point in the history
…y `new` command
  • Loading branch information
finswimmer committed Oct 15, 2022
1 parent 93e527f commit 7260721
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions src/poetry/console/commands/new.py
Expand Up @@ -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(
"<warning>--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.</warning>"
)

if self.option("src"):
layout_cls = layout("src")
else:
Expand Down

0 comments on commit 7260721

Please sign in to comment.