From 5e31fa33c3b5cf726a57a063b8e7a070869250fe Mon Sep 17 00:00:00 2001 From: nsfisis Date: Tue, 19 May 2026 21:46:01 +0900 Subject: fix(compile): fix more random compile errors Co-Authored-By: Claude Opus 4.7 (1M context) --- crates/shirabe/src/compiler.rs | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) (limited to 'crates/shirabe/src/compiler.rs') diff --git a/crates/shirabe/src/compiler.rs b/crates/shirabe/src/compiler.rs index 4185292..db18a66 100644 --- a/crates/shirabe/src/compiler.rs +++ b/crates/shirabe/src/compiler.rs @@ -45,13 +45,13 @@ impl Compiler { shirabe_php_shim::unlink(phar_file); } - let process = ProcessExecutor::new(None, None); + let process = ProcessExecutor::new(None); let command = Git::build_rev_list_command(&process, &["-n1", "--format=%H", "HEAD"]); let mut output = String::new(); // PHP: dirname(__DIR__, 2) - going up 2 levels from src/Composer to the repo root let repo_root = shirabe_php_shim::dirname_levels(file!(), 2); - if process.execute(&command, &mut output, Some(&repo_root)) != 0 { + if process.execute_args(&command, &mut output, Some(&repo_root)) != 0 { return Err(RuntimeException { message: "Can't run git rev-list. You must ensure to run compile from composer git repository clone and that git binary is available.".to_string(), code: 0, @@ -63,7 +63,7 @@ impl Compiler { let command = Git::build_rev_list_command(&process, &["-n1", "--format=%ci", "HEAD"]); let mut output = String::new(); - if process.execute(&command, &mut output, Some(&repo_root)) != 0 { + if process.execute_args(&command, &mut output, Some(&repo_root)) != 0 { return Err(RuntimeException { message: "Can't run git rev-list. You must ensure to run compile from composer git repository clone and that git binary is available.".to_string(), code: 0, @@ -77,7 +77,7 @@ impl Compiler { .unwrap_or_else(|_| chrono::Utc::now()); let mut git_describe_output = String::new(); - if process.execute( + if process.execute_args( &[ "git".to_string(), "describe".to_string(), @@ -225,11 +225,11 @@ impl Compiler { for file in finder.iter() { if let Some(index) = array_search(file.get_real_path(), &extra_files) { extra_files.shift_remove(&index); - } else if !Preg::is_match(r"{(^LICENSE(?:\.txt)?$|\.php$)}", file.get_filename())? { + } else if !Preg::is_match(r"{(^LICENSE(?:\.txt)?$|\.php$)}", &file.get_filename())? { unexpected_files.push(file.to_string()); } - if Preg::is_match(r"{\.php[\d.]*$}", file.get_filename())? { + if Preg::is_match(r"{\.php[\d.]*$}", &file.get_filename())? { self.add_file(&mut phar, &file, true)?; } else { self.add_file(&mut phar, &file, false)?; -- cgit v1.3.1