From 4065d8842beb5d1648131bd5b1951adf7a27b5b7 Mon Sep 17 00:00:00 2001 From: nsfisis Date: Sun, 16 Aug 2026 16:25:35 +0900 Subject: refactor(env): route Shirabe's own env reads through the shim These sites have no PHP counterpart to mirror, so they read std::env directly. Going through the shim's getenv() keeps every environment read in one place and lets a lint forbid the direct form. Co-Authored-By: Claude Opus 5 (1M context) --- crates/shirabe/src/signal.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'crates/shirabe/src/signal.rs') diff --git a/crates/shirabe/src/signal.rs b/crates/shirabe/src/signal.rs index 26297cc7..6ae8dfc1 100644 --- a/crates/shirabe/src/signal.rs +++ b/crates/shirabe/src/signal.rs @@ -172,7 +172,7 @@ mod tests { #[test] fn exit_with_last_signal_kills_by_the_signal() { - if std::env::var("SIGNAL_TEST_CHILD").is_ok() { + if shirabe_php_shim::getenv("SIGNAL_TEST_CHILD").is_some() { let signals = SignalSubscription::new(); raise_sigint(); signals.exit_with_last_signal(); @@ -188,7 +188,7 @@ mod tests { #[test] fn the_default_disposition_returns_once_no_subscription_is_left() { - if std::env::var("SIGNAL_TEST_CHILD").is_ok() { + if shirabe_php_shim::getenv("SIGNAL_TEST_CHILD").is_some() { drop(SignalSubscription::new()); raise_sigint(); unreachable!("SIGINT must terminate the process"); -- cgit v1.3.1-4-g156e