cargo_util/lib.rs
1//! Miscellaneous support code used by Cargo.
2//!
3//! > This crate is maintained by the Cargo team, primarily for use by Cargo
4//! > and not intended for external use (except as a transitive dependency). This
5//! > crate may make major changes to its APIs or be deprecated without warning.
6
7#![allow(clippy::disallowed_methods)]
8
9pub use self::read2::read2;
10pub use du::du;
11pub use process_builder::ProcessBuilder;
12pub use process_error::{exit_status_to_string, is_simple_exit_code, ProcessError};
13pub use sha256::Sha256;
14
15mod du;
16pub mod paths;
17mod process_builder;
18mod process_error;
19mod read2;
20pub mod registry;
21mod sha256;
22
23/// Whether or not this running in a Continuous Integration environment.
24pub fn is_ci() -> bool {
25 std::env::var("CI").is_ok() || std::env::var("TF_BUILD").is_ok()
26}