diff options
| author | nsfisis <nsfisis@gmail.com> | 2026-05-17 14:33:13 +0900 |
|---|---|---|
| committer | nsfisis <nsfisis@gmail.com> | 2026-05-17 14:38:16 +0900 |
| commit | 3e21569688cf0c8a1918c73ff96cb1b3aeffe0b3 (patch) | |
| tree | 712ae7832124da20739f5b389cebe4f44abd7225 /crates/shirabe/src/downloader/git_downloader.rs | |
| parent | ac59538140a93d9a023da2115148bc9779223978 (diff) | |
| download | php-shirabe-3e21569688cf0c8a1918c73ff96cb1b3aeffe0b3.tar.gz php-shirabe-3e21569688cf0c8a1918c73ff96cb1b3aeffe0b3.tar.zst php-shirabe-3e21569688cf0c8a1918c73ff96cb1b3aeffe0b3.zip | |
fix(compile): extract constants from traits to make them dyn-compatible
Diffstat (limited to 'crates/shirabe/src/downloader/git_downloader.rs')
| -rw-r--r-- | crates/shirabe/src/downloader/git_downloader.rs | 29 |
1 files changed, 15 insertions, 14 deletions
diff --git a/crates/shirabe/src/downloader/git_downloader.rs b/crates/shirabe/src/downloader/git_downloader.rs index 1bc0ff1..45849cb 100644 --- a/crates/shirabe/src/downloader/git_downloader.rs +++ b/crates/shirabe/src/downloader/git_downloader.rs @@ -1,5 +1,6 @@ //! ref: composer/src/Composer/Downloader/GitDownloader.php +use crate::io::io_interface; use anyhow::Result; use indexmap::IndexMap; use shirabe_external_packages::composer::pcre::preg::Preg; @@ -89,7 +90,7 @@ impl GitDownloader { package.get_full_pretty_version(), )), true, - IOInterface::NORMAL, + io_interface::NORMAL, ); self.inner.io.write_error( PhpMixed::String(sprintf( @@ -97,7 +98,7 @@ impl GitDownloader { &[PhpMixed::String(cache_path.clone())], )), true, - IOInterface::DEBUG, + io_interface::DEBUG, ); let r#ref = package.get_source_reference(); if self.git_util.fetch_ref_or_sync_mirror( @@ -251,7 +252,7 @@ impl GitDownloader { self.inner .io - .write_error(PhpMixed::String(msg), true, IOInterface::NORMAL); + .write_error(PhpMixed::String(msg), true, io_interface::NORMAL); self.git_util.run_commands(commands, url, &path, true); @@ -335,7 +336,7 @@ impl GitDownloader { self.inner .io - .write_error(PhpMixed::String(msg), true, IOInterface::NORMAL); + .write_error(PhpMixed::String(msg), true, io_interface::NORMAL); let mut output = String::new(); if self.inner.process.execute( @@ -694,7 +695,7 @@ impl GitDownloader { package.get_pretty_name() )), true, - IOInterface::NORMAL, + io_interface::NORMAL, ); let slice_end = 10_usize.min(changes.len()); self.inner.io.write_error( @@ -705,7 +706,7 @@ impl GitDownloader { .collect(), ), true, - IOInterface::NORMAL, + io_interface::NORMAL, ); if (changes.len() as i64) > 10 { self.inner.io.write_error( @@ -714,7 +715,7 @@ impl GitDownloader { changes.len() as i64 - 10 )), true, - IOInterface::NORMAL, + io_interface::NORMAL, ); } @@ -762,7 +763,7 @@ impl GitDownloader { .collect(), ), true, - IOInterface::NORMAL, + io_interface::NORMAL, ); } Some("d") => { @@ -792,7 +793,7 @@ impl GitDownloader { )), ]), true, - IOInterface::NORMAL, + io_interface::NORMAL, ); if update { self.inner.io.write_error( @@ -801,13 +802,13 @@ impl GitDownloader { .to_string(), ), true, - IOInterface::NORMAL, + io_interface::NORMAL, ); } self.inner.io.write_error( PhpMixed::String(" ? - print help".to_string()), true, - IOInterface::NORMAL, + io_interface::NORMAL, ); } } @@ -827,7 +828,7 @@ impl GitDownloader { self.inner.io.write_error( PhpMixed::String(" <info>Re-applying stashed changes</info>".to_string()), true, - IOInterface::NORMAL, + io_interface::NORMAL, ); let mut output = String::new(); if self.inner.process.execute( @@ -1058,7 +1059,7 @@ impl GitDownloader { reference )), true, - IOInterface::NORMAL, + io_interface::NORMAL, ); exception_extra = format!( "\nIt looks like the commit hash is not available in the repository, maybe {}? Run \"composer update {}\" to resolve this.", @@ -1249,7 +1250,7 @@ impl GitDownloader { self.inner .io - .write_error(PhpMixed::String(output), true, IOInterface::NORMAL); + .write_error(PhpMixed::String(output), true, io_interface::NORMAL); } pub(crate) fn normalize_path(&self, path: &str) -> String { |
