diff options
| author | nsfisis <nsfisis@gmail.com> | 2026-06-24 21:38:53 +0900 |
|---|---|---|
| committer | nsfisis <nsfisis@gmail.com> | 2026-06-24 21:40:49 +0900 |
| commit | 7f810b1bb288445ee5376fada752e84ecb1ce211 (patch) | |
| tree | 631ec748f14757d314baba704c6c175183ed096a /crates/shirabe/src/repository | |
| parent | a8f115666344abe3b606a4a65595ca301e7ac08a (diff) | |
| download | php-shirabe-7f810b1bb288445ee5376fada752e84ecb1ce211.tar.gz php-shirabe-7f810b1bb288445ee5376fada752e84ecb1ce211.tar.zst php-shirabe-7f810b1bb288445ee5376fada752e84ecb1ce211.zip | |
feat(process): wire execute output handling to a callback model
Replace the Option<&mut PhpMixed> output plumbing with the IntoExecOutput
trait modelling each PHP `$output` case (forward, capture-to-buffer,
discard, callback). This lets do_execute pass a real output handler to
Process::run, captures output back via get_output, and lets Svn pass its
streaming filter handler through execute instead of skipping it.
Diffstat (limited to 'crates/shirabe/src/repository')
| -rw-r--r-- | crates/shirabe/src/repository/path_repository.rs | 10 |
1 files changed, 3 insertions, 7 deletions
diff --git a/crates/shirabe/src/repository/path_repository.rs b/crates/shirabe/src/repository/path_repository.rs index 1a4cf6f..2f99ceb 100644 --- a/crates/shirabe/src/repository/path_repository.rs +++ b/crates/shirabe/src/repository/path_repository.rs @@ -250,12 +250,12 @@ impl PathRepository { let code1 = self .process .borrow_mut() - .execute(cmd.clone(), Some(&mut ref1), Some(path.as_str())) + .execute(cmd.clone(), &mut ref1, Some(path.as_str())) .unwrap_or(1); let code2 = self .process .borrow_mut() - .execute(cmd, Some(&mut ref2), None) + .execute(cmd, &mut ref2, None) .unwrap_or(1); if code1 == 0 && code2 == 0 && ref1.as_string() == ref2.as_string() { package.insert( @@ -280,11 +280,7 @@ impl PathRepository { && self .process .borrow_mut() - .execute( - PhpMixed::from(command), - Some(&mut output), - Some(path.as_str()), - ) + .execute(PhpMixed::from(command), &mut output, Some(path.as_str())) .unwrap_or(1) == 0 { |
