diff options
| author | nsfisis <nsfisis@gmail.com> | 2026-06-30 01:23:13 +0900 |
|---|---|---|
| committer | nsfisis <nsfisis@gmail.com> | 2026-06-30 01:23:13 +0900 |
| commit | 2b1c6c58a8c9e9afa8ba54214bc0bee48b06142f (patch) | |
| tree | cd4c272651e8a2727debf89e24f09e1c29b18fbc /crates/shirabe/src/downloader/git_downloader.rs | |
| parent | 91ccd49cf68bca199e7d41fa65a4a3b0d1368127 (diff) | |
| download | php-shirabe-2b1c6c58a8c9e9afa8ba54214bc0bee48b06142f.tar.gz php-shirabe-2b1c6c58a8c9e9afa8ba54214bc0bee48b06142f.tar.zst php-shirabe-2b1c6c58a8c9e9afa8ba54214bc0bee48b06142f.zip | |
refactor(git): replace is_callable with RunCommandOutput trait
Model Git::runCommand's mixed $commandOutput parameter with the
RunCommandOutput trait (one impl per PHP mode: discard, by-ref capture,
callable handler), mirroring ProcessExecutor's IntoExecOutput. This moves
the is_callable($commandOutput) value-inspection into the type system and
drops the dependency on the shim's incomplete is_callable.
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Diffstat (limited to 'crates/shirabe/src/downloader/git_downloader.rs')
| -rw-r--r-- | crates/shirabe/src/downloader/git_downloader.rs | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/crates/shirabe/src/downloader/git_downloader.rs b/crates/shirabe/src/downloader/git_downloader.rs index 55cf161..cbd429c 100644 --- a/crates/shirabe/src/downloader/git_downloader.rs +++ b/crates/shirabe/src/downloader/git_downloader.rs @@ -974,7 +974,7 @@ impl VcsDownloader for GitDownloader { self.inner.io.write_error3(&msg, true, io_interface::NORMAL); self.git_util - .run_commands(commands, url, Some(&path), true, None)?; + .run_commands(commands, url, Some(&path), true, ())?; let source_url = package.get_source_url(); if Some(url) != source_url.as_deref() && source_url.is_some() { @@ -1092,7 +1092,7 @@ impl VcsDownloader for GitDownloader { ]; self.git_util - .run_commands(commands, url, Some(&path), false, None)?; + .run_commands(commands, url, Some(&path), false, ())?; } let command = vec![ @@ -1104,7 +1104,7 @@ impl VcsDownloader for GitDownloader { "%sanitizedUrl%".to_string(), ]; self.git_util - .run_commands(vec![command], url, Some(&path), false, None)?; + .run_commands(vec![command], url, Some(&path), false, ())?; let pretty_version = target.get_pretty_version(); if let Some(new_ref) = |
