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

feat: support None to remove envvars #812

Merged
merged 1 commit into from
Apr 12, 2024

Conversation

henryiii
Copy link
Collaborator

@henryiii henryiii commented Apr 9, 2024

Followup to #804. Setting env={"NOCOLOR": None} will unset the value if it exists in the outer environment.

Signed-off-by: Henry Schreiner <henryschreineriii@gmail.com>
@henryiii henryiii changed the title feat: support None to remone envvars feat: support None to remove envvars Apr 9, 2024
@henryiii
Copy link
Collaborator Author

henryiii commented Apr 12, 2024

I got a thumbs up, anyone want to do a review? Nice to have an approval. ;). (This will likely require #815 to be rebased once it's in)

@henryiii henryiii merged commit bc21883 into wntrblm:main Apr 12, 2024
22 checks passed
@henryiii henryiii deleted the henryiii/feat/noneenv branch April 12, 2024 19:49
@edgarrmondragon
Copy link
Contributor

Should there be a documentation update for this?

@henryiii henryiii mentioned this pull request Apr 15, 2024
@henryiii
Copy link
Collaborator Author

I did add it to the docs. It's only present in nox/sessions.py, but that's the only place env= is documented. It shows up in the docs page, though.

Comment on lines +353 to +355
command. By default, all environment variables are passed. You
can block an environment variable from the outer environment by
setting it to None.
Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Docs update here.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

3 participants