Skip to content

Commit

Permalink
Fix crash when exported requirements contain Poetry warnings
Browse files Browse the repository at this point in the history
  • Loading branch information
cjolowicz committed Jun 11, 2021
1 parent 595c744 commit b43c602
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion src/nox_poetry/sessions.py
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,14 @@ def to_constraint(requirement_string: str, line: int) -> Optional[str]:
"""Convert requirement to constraint."""
if any(
requirement_string.startswith(prefix)
for prefix in ("-", "file://", "git+https://", "http://", "https://")
for prefix in (
"-",
"file://",
"git+https://",
"http://",
"https://",
"Warning: ", # Poetry writes warnings to stdout.
)
):
return None

Expand Down

0 comments on commit b43c602

Please sign in to comment.