Skip to content

Commit

Permalink
fix: remove xz support
Browse files Browse the repository at this point in the history
  • Loading branch information
salamaashoush committed May 31, 2024
1 parent 33a747d commit d2fbeac
Show file tree
Hide file tree
Showing 5 changed files with 5 additions and 27 deletions.
5 changes: 5 additions & 0 deletions .changeset/nervous-donkeys-act.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"pactup": patch
---

fix: remove xz support
2 changes: 0 additions & 2 deletions src/archive/extract.rs
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,6 @@ pub trait Extract {

pub enum ArchiveType {
TarGz,
TarXz,
Zip,
}

Expand All @@ -63,7 +62,6 @@ impl ArchiveType {
})?;
match archive_type {
"gz" => Ok(Self::TarGz),
"xz" => Ok(Self::TarXz),
"zip" => Ok(Self::Zip),
_ => Err(Error::UnknownArchiveType {
content_type: archive_type.to_string(),
Expand Down
2 changes: 0 additions & 2 deletions src/archive/mod.rs
Original file line number Diff line number Diff line change
@@ -1,9 +1,7 @@
pub mod extract;
pub mod tar_gz;
pub mod tar_xz;
pub mod zip;

pub use self::extract::{Error, Extract};
pub use self::tar_gz::TarGz;
pub use self::tar_xz::TarXz;
pub use self::zip::Zip;
22 changes: 0 additions & 22 deletions src/archive/tar_xz.rs

This file was deleted.

1 change: 0 additions & 1 deletion src/downloader.rs
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,6 @@ fn extract_archive_into(
) -> Result<(), Error> {
let _ = match ArchiveType::from(download_url)? {
ArchiveType::TarGz => archive::TarGz::new(response).extract_into(path),
ArchiveType::TarXz => archive::TarXz::new(response).extract_into(path),
ArchiveType::Zip => archive::Zip::new(response).extract_into(path),
};
Ok(())
Expand Down

0 comments on commit d2fbeac

Please sign in to comment.