aboutsummaryrefslogtreecommitdiffhomepage
path: root/crates/shirabe/src
diff options
context:
space:
mode:
authornsfisis <nsfisis@gmail.com>2026-06-06 23:11:03 +0900
committernsfisis <nsfisis@gmail.com>2026-06-06 23:11:03 +0900
commit0d45c403c20ac8950f2877a21f9cd4f0ca9bf784 (patch)
treeccef34acb7844f500281f3e58a73c61ede34a51a /crates/shirabe/src
parentc028a9d5c737de5d2b259638a0a76b999364a262 (diff)
downloadphp-shirabe-0d45c403c20ac8950f2877a21f9cd4f0ca9bf784.tar.gz
php-shirabe-0d45c403c20ac8950f2877a21f9cd4f0ca9bf784.tar.zst
php-shirabe-0d45c403c20ac8950f2877a21f9cd4f0ca9bf784.zip
fix(git): run git --version in getVersion
The execute call was stubbed out during Phase B, so getVersion never ran git --version and always reported no version. Wire it to ProcessExecutor::execute_args. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Diffstat (limited to 'crates/shirabe/src')
-rw-r--r--crates/shirabe/src/util/git.rs10
1 files changed, 5 insertions, 5 deletions
diff --git a/crates/shirabe/src/util/git.rs b/crates/shirabe/src/util/git.rs
index 7e9619c..d9cfdfd 100644
--- a/crates/shirabe/src/util/git.rs
+++ b/crates/shirabe/src/util/git.rs
@@ -159,8 +159,6 @@ impl Git {
None
};
- // TODO(phase-b): closure captures &mut self.process, &mut last_command, etc.
- // Inlined as a helper that returns (status, last_command, output)
let cwd_string = cwd.map(|s| s.to_string());
// PHP closure: $runCommands = function ($url) use (...) { ... };
@@ -1342,9 +1340,11 @@ impl Git {
if version.is_none() {
*version = Some(None);
let mut output = String::new();
- // TODO(phase-b): ProcessExecutor::execute takes &mut self; this static fn takes &ProcessExecutor
- // For now, mimic the call signature (compilation fix is Phase B)
- let exit_code: i64 = 0; // process.execute(&["git", "--version"].map(String::from).to_vec(), &mut output, None);
+ let exit_code: i64 = process.borrow_mut().execute_args(
+ &["git".to_string(), "--version".to_string()],
+ &mut output,
+ Option::<&str>::None,
+ );
if exit_code == 0 {
let mut matches: IndexMap<CaptureKey, String> = IndexMap::new();
if Preg::is_match_strict_groups3(