env_unset
env_unset returns a dependency that removes an environment variable. It is useful when a tool treats an optional variable as configuration that should not apply to a task.
Arguments
| Argument | Required | Description |
|---|---|---|
key | Yes | Environment variable name to remove. |
Examples
Remove one variable
load("@os@1", "env_unset", "run")
run(("tools/check",), deps=[env_unset("TOOL_CONFIG")])
Combine unset and set operations
load("@os@1", "env_set", "env_unset", "run")
clean_ci = (
env_unset("LOCAL_CONFIG") +
env_set("CI", "true")
)
run(("tools/test",), deps=[clean_ci])