Skip to main content

real_env

Function real_env 

Source
pub fn real_env(name: &str) -> bool
Expand description

Whether an environment variable is set, in the real process.

The production answer for run’s env_is_set. Injected rather than read inline so the wizard’s tests need no std::env::set_var, which is unsafe in edition 2024 because a concurrent reader on another thread is a data race

  • and cargo test is multi-threaded.