Commit 80296c2e by finswimmer Committed by Bjorn Neergaard

feat(cli): added warning about ignoring --directory when trying to apply `new` command

parent eb4b45d7
...@@ -34,6 +34,12 @@ class NewCommand(Command): ...@@ -34,6 +34,12 @@ class NewCommand(Command):
from poetry.layouts import layout from poetry.layouts import layout
from poetry.utils.env import SystemEnv 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"): if self.option("src"):
layout_cls = layout("src") layout_cls = layout("src")
else: else:
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment