aboutsummaryrefslogtreecommitdiffhomepage
path: root/crates/shirabe/src/downloader/hg_downloader.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/downloader/hg_downloader.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/downloader/hg_downloader.rs')
-rw-r--r--crates/shirabe/src/downloader/hg_downloader.rs30
1 files changed, 19 insertions, 11 deletions
diff --git a/crates/shirabe/src/downloader/hg_downloader.rs b/crates/shirabe/src/downloader/hg_downloader.rs
index 1b4204f..161eb7e 100644
--- a/crates/shirabe/src/downloader/hg_downloader.rs
+++ b/crates/shirabe/src/downloader/hg_downloader.rs
@@ -37,7 +37,11 @@ impl HgDownloader {
path: String,
url: String,
) -> Result<Box<dyn PromiseInterface>> {
- let hg_utils = HgUtils::new(&self.inner.io, &self.inner.config, &self.inner.process);
+ let hg_utils = HgUtils::new(
+ &*self.inner.io,
+ &*self.inner.config.borrow(),
+ &self.inner.process,
+ );
let path_clone = path.clone();
let clone_command = move |url: String| -> Vec<String> {
@@ -58,7 +62,7 @@ impl HgDownloader {
package.get_source_reference().unwrap_or_default(),
];
let mut ignored_output = String::new();
- if self.inner.process.execute(
+ if self.inner.process.borrow_mut().execute_args(
&command,
&mut ignored_output,
shirabe_php_shim::realpath(&path),
@@ -68,7 +72,7 @@ impl HgDownloader {
message: format!(
"Failed to execute {}\n\n{}",
command.join(" "),
- self.inner.process.get_error_output()
+ self.inner.process.borrow().get_error_output()
),
code: 0,
}
@@ -85,7 +89,11 @@ impl HgDownloader {
path: String,
url: String,
) -> Result<Box<dyn PromiseInterface>> {
- let hg_utils = HgUtils::new(&self.inner.io, &self.inner.config, &self.inner.process);
+ let hg_utils = HgUtils::new(
+ &*self.inner.io,
+ &*self.inner.config.borrow(),
+ &self.inner.process,
+ );
let ref_ = target.get_source_reference().unwrap_or_default();
self.inner.io.write_error(&format!(
@@ -132,7 +140,7 @@ impl HgDownloader {
}
let mut output = String::new();
- self.inner.process.execute(
+ self.inner.process.borrow_mut().execute_args(
&["hg".to_string(), "st".to_string()],
&mut output,
shirabe_php_shim::realpath(&path),
@@ -163,17 +171,17 @@ impl HgDownloader {
];
let mut output = String::new();
- if self
- .inner
- .process
- .execute(&command, &mut output, shirabe_php_shim::realpath(&path))
- != 0
+ if self.inner.process.borrow_mut().execute_args(
+ &command,
+ &mut output,
+ shirabe_php_shim::realpath(&path),
+ ) != 0
{
return Err(RuntimeException {
message: format!(
"Failed to execute {}\n\n{}",
command.join(" "),
- self.inner.process.get_error_output()
+ self.inner.process.borrow().get_error_output()
),
code: 0,
}