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

allow tox to reject invalid or unexpected target parameters #646

Closed
ssbarnea opened this issue Oct 9, 2017 · 4 comments
Closed

allow tox to reject invalid or unexpected target parameters #646

ssbarnea opened this issue Oct 9, 2017 · 4 comments
Labels
area:configuration feature:change something exists already but should behave differently

Comments

@ssbarnea
Copy link
Member

ssbarnea commented Oct 9, 2017

Currently tox will try to create any unexpected target environment even if the user makes a typo. We would like to be able to have an option that will make tox return an error on unknown environments.

Because this may break some setups I suspect that the correct implementation would be to add add a tox.ini config item that would enable this behaviour, like enforce_envlist=True

Expected behaviour

tox -e foobar
# same for TOXENV=foobar
Invalid foobar environment
exit code: 1
@cryvate
Copy link

cryvate commented Nov 21, 2017

I get

tox -e asdf
ERROR: unknown environment 'asdf'
exit code: 1

with nothing being created on tox 2.8.0 and 2.9.1. This looks like your expected behaviour?

@ssbarnea
Copy link
Member Author

@cryvate this sounds like good news to me. No more typos in environment name! A good reason to bump tox.

@cryvate
Copy link

cryvate commented Nov 21, 2017

@ssbarnea: it seems that this was added/changed in version 1.8.1. I think this can be closed.

@The-Compiler
Copy link
Member

Assuming this is fixed then! FWIW this has been the behaviour for as long as I can remember using tox 😉

@obestwalter obestwalter added feature:change something exists already but should behave differently area:configuration labels Jan 23, 2018
@tox-dev tox-dev locked and limited conversation to collaborators Jan 14, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
area:configuration feature:change something exists already but should behave differently
Projects
None yet
Development

No branches or pull requests

4 participants