Skip to content

This issue was moved to a discussion.

You can continue the conversation there. Go to discussion →

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

Environment variables containing strings with spaces are not accepted any longer for passenv/pass_env. #2696

Closed
Marc2508 opened this issue Dec 13, 2022 · 2 comments

Comments

@Marc2508
Copy link

Looks like this change:
#2658
causes an error for environment variables that are strings:
py3: failed with pass_env values cannot contain whitespace, use comma to have multiple values in a single line, invalid values found '-m "not scale"'

export PYTEST_ARGS = '-m "not scale"'

passenv =
{env:PYTEST_ARGS}

Is this intended?

@mgedmin
Copy link
Contributor

mgedmin commented Dec 13, 2022

This seems like weird syntax. If you want PYTEST_ARGS to be passed to the commands executed by tox, you would put

pasenv = PYTEST_ARGS

in the tox.ini. Why are you using {env:PYTEST_ARGS}? {env:...} is for including the value of the environment variable into tox configuration.

@gaborbernat
Copy link
Member

This seems like a broken configuration where the validation caught it. You're welcome 😊

@tox-dev tox-dev locked and limited conversation to collaborators Dec 13, 2022
@gaborbernat gaborbernat converted this issue into discussion #2699 Dec 13, 2022

This issue was moved to a discussion.

You can continue the conversation there. Go to discussion →

Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants