-
Notifications
You must be signed in to change notification settings - Fork 2.4k
Closed
Labels
kind/featureFeature requests/implementationsFeature requests/implementationsstatus/triageThis issue needs to be triagedThis issue needs to be triaged
Description
Issue Kind
Brand new capability
Description
poetry check exits with error code 1 even when there are only warnings and no hard errors.
This is standard UNIX behavior, but it makes it impossible to distinguish warnings from hard errors.
Example scenario
When upgrading Poetry to 2.0, my project.toml file caused poetry check to raise warnings, and exit with exit code 1:
I don't have a problem with that, but it seems inconvenient that there is no way to check for warnings vs hard errors.
Suggested solutions
Here are two ideas:
- Exit with error code
2when there are only warnings and no hard errors - Add a flag
--soft-warningscausingpoetry checkto pass (exit code0) when there are only warnings and no hard errors
Workarounds
Suboptimal workaroung:
poetry check || echo "Some errors or warnings were raised by 'poetry check'"
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
kind/featureFeature requests/implementationsFeature requests/implementationsstatus/triageThis issue needs to be triagedThis issue needs to be triaged