diff --git a/.github/PULL_REQUEST_TEMPLATE.md b/.github/PULL_REQUEST_TEMPLATE.md index 7be9e33d8a..9e1da04005 100644 --- a/.github/PULL_REQUEST_TEMPLATE.md +++ b/.github/PULL_REQUEST_TEMPLATE.md @@ -3,7 +3,7 @@ Please, make sure you address all the checklists (for details on how see [development documentation](http://tox.readthedocs.org/en/latest/development.html#development))! -- [ ] ran the linter to address style issues (`tox -e fix_lint`) +- [ ] ran the linter to address style issues (`tox -e fix`) - [ ] wrote descriptive pull request text - [ ] ensured there are test(s) validating the fix - [ ] added news fragment in `docs/changelog` folder diff --git a/src/tox/tox_env/api.py b/src/tox/tox_env/api.py index abcdc78b47..34b04a3fdb 100644 --- a/src/tox/tox_env/api.py +++ b/src/tox/tox_env/api.py @@ -21,7 +21,7 @@ from tox.execute.request import ExecuteRequest from tox.journal import EnvJournal from tox.report import OutErr, ToxHandler -from tox.tox_env.errors import Recreate, Skip +from tox.tox_env.errors import Fail, Recreate, Skip from tox.tox_env.info import Info from tox.tox_env.installer import Installer from tox.util.path import ensure_empty_dir @@ -131,6 +131,12 @@ def register_config(self) -> None: ) def pass_env_post_process(values: list[str]) -> list[str]: + blank_values = [v for v in values if " " in v or "\t" in v] + if blank_values: + raise Fail( + f"pass_env/passenv variable can't have values containing " + f"blanks like {blank_values}; a comma is possibly missing", + ) values.extend(self._default_pass_env()) return sorted({k: None for k in values}.keys())