Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Improve error message to highlight solution to user configuration err… #9651

Open
wants to merge 3 commits into
base: main
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions src/poetry/console/commands/install.py
Original file line number Diff line number Diff line change
Expand Up @@ -201,6 +201,8 @@ def handle(self) -> int:
"If you want to use Poetry only for dependency management"
" but not for packaging, you can disable package mode by setting"
" <c1>package-mode = false</> in your pyproject.toml file.\n"
"If you did intend to install the current project please make sure"
" you set the packages setting in your pyproject.toml file.\n"
Comment on lines +204 to +205
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
"If you did intend to install the current project please make sure"
" you set the packages setting in your pyproject.toml file.\n"
"If you did intend to install the current project you may need"
" to set `packages` in your pyproject.toml file.\n"

I agree it makes sense to provide additional information. I would only rephrase it slightly because setting packages is only required if your package name does not match your project name.

"In a future version of Poetry this warning will become an error!",
style="warning",
)
Expand Down
Loading