Skip to content

Commit

Permalink
feat(cli): added warning about ignoring --directory when trying to ap…
Browse files Browse the repository at this point in the history
…ply `new` command
  • Loading branch information
finswimmer committed Nov 3, 2022
1 parent 103421a commit 46bc43f
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("directory"):
self.line_error(
"<warning>--directory 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 46bc43f

Please sign in to comment.