Skip to content

Commit

Permalink
treat .tgz the same as .tar.gz
Browse files Browse the repository at this point in the history
  • Loading branch information
soof-golan committed Sep 8, 2024
1 parent 4466402 commit 7e252bf
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion crates/distribution-filename/src/extension.rs
Original file line number Diff line number Diff line change
Expand Up @@ -70,6 +70,7 @@ impl SourceDistExtension {
match extension {
"zip" => Ok(Self::Zip),
"gz" if is_tar(path.as_ref()) => Ok(Self::TarGz),
"tgz" => Ok(Self::TarGz),
"bz2" if is_tar(path.as_ref()) => Ok(Self::TarBz2),
"xz" if is_tar(path.as_ref()) => Ok(Self::TarXz),
"zst" if is_tar(path.as_ref()) => Ok(Self::TarZst),
Expand All @@ -94,6 +95,6 @@ impl Display for SourceDistExtension {
pub enum ExtensionError {
#[error("`.whl`, `.zip`, `.tar.gz`, `.tar.bz2`, `.tar.xz`, or `.tar.zst`")]
Dist,
#[error("`.zip`, `.tar.gz`, `.tar.bz2`, `.tar.xz`, or `.tar.zst`")]
#[error("`.zip`, `.tar.gz`, `.tgz`, `.tar.bz2`, `.tar.xz`, or `.tar.zst`")]
SourceDist,
}

0 comments on commit 7e252bf

Please sign in to comment.