Skip to main content

Module process_env

Module process_env 

Source
Expand description

Process environment with a thread-local overlay for tests.

Production reads std::env. Tests call override_var so they never need set_var / remove_var, which are unsafe in edition 2024.

Functionsยง

clear_override
Drop the overlay for key so later reads use the real process environment.
override_var
Pretend key is value (None means unset) on this thread.
var
Read key, honouring a test overlay if one is set on this thread.