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

Function adoption_failpoint

atomic-repository/src/repository/adoption.rs:2988–2995  ·  view source on GitHub ↗
(name: &str)

Source from the content-addressed store, hash-verified

2986/// environment value can alter adoption behavior.
2987#[cfg(feature = "adoption-test-injection")]
2988fn adoption_failpoint(name: &str) -> Result<(), RepositoryError> {
2989 if std::env::var_os(name).is_some() {
2990 return Err(RepositoryError::Io(std::io::Error::other(format!(
2991 "debug failpoint: {name}"
2992 ))));
2993 }
2994 Ok(())
2995}
2996
2997/// Shipping build (`adoption-test-injection` disabled, R8): the failpoint
2998/// seam does not exist — no environment variable is read and nothing can

Calls

no outgoing calls