diff options
| author | nsfisis <nsfisis@gmail.com> | 2026-06-24 21:10:48 +0900 |
|---|---|---|
| committer | nsfisis <nsfisis@gmail.com> | 2026-06-24 21:11:03 +0900 |
| commit | a8f115666344abe3b606a4a65595ca301e7ac08a (patch) | |
| tree | 9af244392d41542fae74ceab1be0b8fb473bdd46 /crates/shirabe/src/util/filesystem.rs | |
| parent | 6dcc2125974e350d1844c5ce1bb3562e224f3435 (diff) | |
| download | php-shirabe-a8f115666344abe3b606a4a65595ca301e7ac08a.tar.gz php-shirabe-a8f115666344abe3b606a4a65595ca301e7ac08a.tar.zst php-shirabe-a8f115666344abe3b606a4a65595ca301e7ac08a.zip | |
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) <noreply@anthropic.com>
Diffstat (limited to 'crates/shirabe/src/util/filesystem.rs')
| -rw-r--r-- | crates/shirabe/src/util/filesystem.rs | 10 |
1 files changed, 5 insertions, 5 deletions
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 \"{}\".", |
