Repository navigation
✨ feat(env): add disallow_pass_env to exclude env vars - #3698
Merged
Merged
Conversation
When using pass_env with wildcards like FOO_*, there was no way to exclude specific variables from the match. The new disallow_pass_env option accepts the same fnmatch glob patterns and filters out matching variables after pass_env expansion, before set_env is applied. Closes tox-dev#1387
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
When using
pass_envwith wildcards likeFOO_*, there was no way to exclude specific variables from the matched set. Tools whereunsetand empty-string have different semantics were impossible to configure correctly.The new
disallow_pass_envoption accepts the samefnmatchglob patterns aspass_envand filters out matching variables afterpass_envexpansion, beforeset_envis applied. This keeps the configuration model simple — a separate key rather than overloaded syntax like!FOOinpass_env.Closes #1387