From dfd98ce4b227a3a14dc913c669bee4f077a65178 Mon Sep 17 00:00:00 2001 From: nsfisis Date: Sun, 9 Aug 2026 09:34:34 +0900 Subject: refactor(php-shim): make the fs mutators return Result mkdir, rmdir, unlink and symlink each had a bool version and a _result twin returning the io::Error, which left two names for one call. Keep only the Result form and let the callers that want a boolean spell out .is_ok(). Call sites that discard the outcome, as their PHP originals do, are unchanged. Co-Authored-By: Claude Opus 5 (1M context) --- crates/shirabe/src/console/application.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'crates/shirabe/src/console') diff --git a/crates/shirabe/src/console/application.rs b/crates/shirabe/src/console/application.rs index bf1f3575..05cd1d22 100644 --- a/crates/shirabe/src/console/application.rs +++ b/crates/shirabe/src/console/application.rs @@ -2335,7 +2335,7 @@ impl ApplicationHandle { ); if !(file_put_contents(&tempfile, file!().as_bytes()).is_some_and(|n| n > 0) && file_get_contents(&tempfile).as_deref() == Some(file!()) - && unlink(&tempfile) + && unlink(&tempfile).is_ok() && !file_exists(&tempfile)) { return Ok(Some(format!("PHP temp directory ({}) does not exist or is not writable to Composer. Set sys_temp_dir in your php.ini", sys_get_temp_dir()))); -- cgit v1.3.1-4-g156e