MCPcopy Create free account
hub / github.com/atomicdotdev/atomic / detect

Method detect

atomic-repository/src/change_source/selected.rs:20–27  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

18
19impl ChangeSourceEnvironment {
20 pub fn detect() -> Self {
21 Self {
22 ci: std::env::var_os("CI").is_some(),
23 container: std::env::var_os("container").is_some()
24 || std::env::var_os("KUBERNETES_SERVICE_HOST").is_some()
25 || Path::new("/.dockerenv").exists(),
26 }
27 }
28}
29
30/// Transaction-local source selection. Failures fall back to a complete scan

Callers

nothing calls this directly

Calls 1

existsMethod · 0.45

Tested by

no test coverage detected