Skip to main content

unattended_environment

Function unattended_environment 

Source
pub fn unattended_environment() -> Option<&'static str>
Expand description

The reason this looks like a machine nobody is sitting at, if it does.

DEV_PRUNE_NO_AUTO_SETUP and auto_setup are both switches you have to set before the first run — which is exactly the run that installs things, so in a container or a CI job the damage is done by the time there is anywhere to set them. Detecting the environment is the only opt-out that works on the first run, which is the only run that matters here.

Deliberately conservative: every signal below is one that CI providers and container runtimes set themselves, so a developer’s own shell will not trip it. Someone who genuinely wants the integrations in CI can still ask in so many words with devp setup, which never consults this.