poetry-plugin-export icon indicating copy to clipboard operation
poetry-plugin-export copied to clipboard

Providing both `--with Foo` and `--without Foo` results in ignoring `--without`

Open pmav99 opened this issue 4 years ago • 0 comments

Currently providing --with and --without simultaneously results in without being ignored.

[tool.poetry]
name = "aaa"
version = "0.1.0"
description = ""
authors = ["pmav99 <[email protected]>"]
readme = "README.md"

[tool.poetry.dependencies]
python = "^3.9"

[tool.poetry.group.optional]
optional = true

[tool.poetry.group.optional.dependencies]
pytest= "*"

[build-system]
requires = ["poetry-core"]
build-backend = "poetry.core.masonry.api"
$ poetry export --without-hashes --without optional | ag pytest                

$ poetry export --without-hashes --with optional | ag pytest                   
pytest==6.2.5; python_version >= "3.6"

$ poetry export --without-hashes --with optional --without optional | ag pytest  # <- Without is being ignored
pytest==6.2.5; python_version >= "3.6"

I think that throwing an Error in this case is probably a better idea.

pmav99 avatar Sep 30 '21 16:09 pmav99