Skip to content
Unverified Commit 427d922a authored by SoSaymon's avatar SoSaymon Committed by GitHub
Browse files

Fix `poetry new` behavior when used in an existing empty directory (#10431)

This commit addresses unexpected behavior when running `poetry new` in an already existing empty directory, including the current directory (`.`). It ensures that `poetry new` handles these cases correctly, while maintaining the expected behavior of `poetry init`.

The fix introduces a new argument, `create_layout_if_empty`, to the `_init_pyproject` method in the `InitCommand` class. Additionally, it adds a conditional check to determine whether a full project layout should be created or only a `pyproject.toml` file.
parent aeaa3d09
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment