From a73e44e327776ac4ba79737eea6b6ad00cf00da6 Mon Sep 17 00:00:00 2001 From: nsfisis Date: Sun, 5 Jul 2026 00:30:29 +0900 Subject: fix(platform): match PHP truthy semantics for CI env checks Platform::get_env("CI").is_some()/is_none() only checked whether the variable was set, unlike PHP's (bool) Platform::getEnv('CI') which treats "" and "0" as falsy. CI="0" (used by some CI providers to explicitly disable CI mode) would previously flip behavior compared to Composer. --- crates/shirabe/src/installer/installation_manager.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'crates/shirabe/src/installer') diff --git a/crates/shirabe/src/installer/installation_manager.rs b/crates/shirabe/src/installer/installation_manager.rs index d89487c..04bff2a 100644 --- a/crates/shirabe/src/installer/installation_manager.rs +++ b/crates/shirabe/src/installer/installation_manager.rs @@ -488,7 +488,7 @@ impl InstallationManager { } if self.output_progress - && Platform::get_env("CI").is_none() + && !Platform::get_env("CI").is_some_and(|v| !v.is_empty() && v != "0") && !self.io.is_debug() && download_promise_count > 1 { @@ -747,7 +747,7 @@ impl InstallationManager { } if self.output_progress - && Platform::get_env("CI").is_none() + && !Platform::get_env("CI").is_some_and(|v| !v.is_empty() && v != "0") && !self.io.is_debug() && promise_count > 1 { -- cgit v1.3.1