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 31, 2022
1 parent 8d7d6b9 commit fe3abba
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions src/poetry/console/commands/new.py
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,12 @@ 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 only makes sense with existing projects, and will"
" be ignored. You should consider the option --path instead.</warning>"
)

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

0 comments on commit fe3abba

Please sign in to comment.