From a8f115666344abe3b606a4a65595ca301e7ac08a Mon Sep 17 00:00:00 2001 From: nsfisis Date: Wed, 24 Jun 2026 21:10:48 +0900 Subject: refactor(process): take cwd as Option<&str> instead of IntoExecCwd Replace the generic cwd parameter backed by the IntoExecCwd trait with a concrete Option<&str> across execute/execute_args/execute_tty/execute_async. Co-Authored-By: Claude Opus 4.8 (1M context) --- crates/shirabe/src/util/filesystem.rs | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'crates/shirabe/src/util/filesystem.rs') diff --git a/crates/shirabe/src/util/filesystem.rs b/crates/shirabe/src/util/filesystem.rs index 90deba1..6510638 100644 --- a/crates/shirabe/src/util/filesystem.rs +++ b/crates/shirabe/src/util/filesystem.rs @@ -121,7 +121,7 @@ impl Filesystem { .execute( PhpMixed::List(cmd.iter().map(|s| PhpMixed::String(s.clone())).collect()), Some(&mut output), - (), + None, ) .map(|n| n == 0) .unwrap_or(false); @@ -161,7 +161,7 @@ impl Filesystem { .get_process() .execute_async( PhpMixed::List(cmd.iter().map(|s| PhpMixed::String(s.clone())).collect()), - (), + None, ) .await?; @@ -499,7 +499,7 @@ impl Filesystem { "/Y".to_string(), ], &mut output, - (), + None, ); // clear stat cache because external processes aren't tracked by the php stat cache @@ -517,7 +517,7 @@ impl Filesystem { let result = self.get_process().execute_args( &["mv".to_string(), source.to_string(), target.to_string()], &mut output, - (), + None, ); // clear stat cache because external processes aren't tracked by the php stat cache @@ -951,7 +951,7 @@ impl Filesystem { Platform::realpath(target), ]; let mut output = String::new(); - if self.get_process().execute_args(&cmd, &mut output, ()) != 0 { + if self.get_process().execute_args(&cmd, &mut output, None) != 0 { return Err(IOException::new( format!( "Failed to create junction to \"{}\" at \"{}\".", -- cgit v1.3.1