aboutsummaryrefslogtreecommitdiffhomepage
path: root/crates/shirabe/src/platform/hhvm_detector.rs
diff options
context:
space:
mode:
authornsfisis <nsfisis@gmail.com>2026-05-19 21:46:01 +0900
committernsfisis <nsfisis@gmail.com>2026-05-19 21:46:08 +0900
commit5e31fa33c3b5cf726a57a063b8e7a070869250fe (patch)
tree98522466966fa7df483cad174ab5fc03db39bc09 /crates/shirabe/src/platform/hhvm_detector.rs
parentc839244d8d09f3036ebfee8eef7eb6b147e593ab (diff)
downloadphp-shirabe-5e31fa33c3b5cf726a57a063b8e7a070869250fe.tar.gz
php-shirabe-5e31fa33c3b5cf726a57a063b8e7a070869250fe.tar.zst
php-shirabe-5e31fa33c3b5cf726a57a063b8e7a070869250fe.zip
fix(compile): fix more random compile errors
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Diffstat (limited to 'crates/shirabe/src/platform/hhvm_detector.rs')
-rw-r--r--crates/shirabe/src/platform/hhvm_detector.rs11
1 files changed, 6 insertions, 5 deletions
diff --git a/crates/shirabe/src/platform/hhvm_detector.rs b/crates/shirabe/src/platform/hhvm_detector.rs
index b425bfe..4e40a00 100644
--- a/crates/shirabe/src/platform/hhvm_detector.rs
+++ b/crates/shirabe/src/platform/hhvm_detector.rs
@@ -12,13 +12,13 @@ static HHVM_VERSION_CACHE: Mutex<Option<Option<String>>> = Mutex::new(None);
#[derive(Debug)]
pub struct HhvmDetector {
executable_finder: Option<ExecutableFinder>,
- process_executor: Option<ProcessExecutor>,
+ process_executor: Option<std::rc::Rc<std::cell::RefCell<ProcessExecutor>>>,
}
impl HhvmDetector {
pub fn new(
executable_finder: Option<ExecutableFinder>,
- process_executor: Option<ProcessExecutor>,
+ process_executor: Option<std::rc::Rc<std::cell::RefCell<ProcessExecutor>>>,
) -> Self {
Self {
executable_finder,
@@ -50,9 +50,9 @@ impl HhvmDetector {
.get_or_insert_with(ExecutableFinder::new);
let hhvm_path = finder.find("hhvm", None, &[]);
if let Some(hhvm_path) = hhvm_path {
- let executor = self
- .process_executor
- .get_or_insert_with(|| ProcessExecutor::new(None, None));
+ let executor = self.process_executor.get_or_insert_with(|| {
+ std::rc::Rc::new(std::cell::RefCell::new(ProcessExecutor::new(None)))
+ });
let mut version_output = shirabe_php_shim::PhpMixed::Null;
let cmd = shirabe_php_shim::PhpMixed::List(
[
@@ -68,6 +68,7 @@ impl HhvmDetector {
.collect(),
);
let exit_code = executor
+ .borrow_mut()
.execute(cmd, Some(&mut version_output), None)
.unwrap_or(1);
if exit_code == 0 {