diff options
| author | nsfisis <nsfisis@gmail.com> | 2026-08-16 16:25:35 +0900 |
|---|---|---|
| committer | nsfisis <nsfisis@gmail.com> | 2026-08-16 17:34:46 +0900 |
| commit | 4065d8842beb5d1648131bd5b1951adf7a27b5b7 (patch) | |
| tree | 71508f3bfc34330e210227b63619342444b19330 /crates/shirabe-php-rpc/src/composer_runtime.rs | |
| parent | 2bb7e5b09947154fd3b2e20d9f4837482e96ab1a (diff) | |
| download | php-shirabe-4065d8842beb5d1648131bd5b1951adf7a27b5b7.tar.gz php-shirabe-4065d8842beb5d1648131bd5b1951adf7a27b5b7.tar.zst php-shirabe-4065d8842beb5d1648131bd5b1951adf7a27b5b7.zip | |
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) <noreply@anthropic.com>
Diffstat (limited to 'crates/shirabe-php-rpc/src/composer_runtime.rs')
| -rw-r--r-- | crates/shirabe-php-rpc/src/composer_runtime.rs | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/crates/shirabe-php-rpc/src/composer_runtime.rs b/crates/shirabe-php-rpc/src/composer_runtime.rs index d5024fad..afa7c6e1 100644 --- a/crates/shirabe-php-rpc/src/composer_runtime.rs +++ b/crates/shirabe-php-rpc/src/composer_runtime.rs @@ -51,7 +51,7 @@ fn path_to_string(directory: std::path::PathBuf) -> anyhow::Result<String> { /// The checkout that stands in for the bundle, if `OVERRIDE_ENV` names one. Both the worker and /// the Rust side read the runtime from there instead. fn override_directory() -> anyhow::Result<Option<std::path::PathBuf>> { - let Some(directory) = std::env::var_os(OVERRIDE_ENV) else { + let Some(directory) = shirabe_php_shim::getenv(OVERRIDE_ENV) else { return Ok(None); }; let directory = std::path::PathBuf::from(directory); |
