1
Fork 0
mirror of https://github.com/RGBCube/uutils-coreutils synced 2025-07-27 19:17:43 +00:00

Merge pull request #5769 from samueltardieu/is-ok-and

test: use clearer expression for CI testing
This commit is contained in:
Sylvestre Ledru 2024-01-01 22:45:37 +01:00 committed by GitHub
commit 2c73e978ba
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -55,9 +55,7 @@ const DEFAULT_ENV: [(&str, &str); 2] = [("LC_ALL", "C"), ("TZ", "UTC")];
/// Test if the program is running under CI
pub fn is_ci() -> bool {
std::env::var("CI")
.unwrap_or_else(|_| String::from("false"))
.eq_ignore_ascii_case("true")
std::env::var("CI").is_ok_and(|s| s.eq_ignore_ascii_case("true"))
}
/// Read a test scenario fixture, returning its bytes