is_ci
Whether the environment looks like a CI run.
The same as detect(get).is_some(). The environment is a parameter: pass
&|name| std::env::var(name).ok() for the real one.
Import
Section titled “Import”Cargo feature ci (enabled by default). To compile only this module:
or in Cargo.toml:
Signature
Section titled “Signature”Parameters
Section titled “Parameters”| Parameter | Type | Description |
|---|---|---|
get | &dyn Fn(&str) -> Option<String> | Looks a variable up by name. |
Returns
Section titled “Returns”bool — true when a known CI service, or a truthy CI variable, is present.
