Skip to content

feat: add static backends (Github, GitLab, and HTTP)#5602

Merged
jdx merged 1 commit into
mainfrom
static
Jul 13, 2025
Merged

feat: add static backends (Github, GitLab, and HTTP)#5602
jdx merged 1 commit into
mainfrom
static

feat: static backends

bc805ff
Select commit
Loading
Failed to load commit list.
Cursor / Cursor BugBot completed Jul 13, 2025 in 8m 2s

BugBot Review

BugBot completed review and found 1 potential issue

Request ID: serverGenReqId_c18aace7-c081-4d97-b3bb-fb2c042a4794

Details

Bug: Tar Format Mismatch Causes Decompression Failures

The from_ext function now defaults to TarFormat::Raw for unknown file extensions. However, open_tar incorrectly treats TarFormat::Raw identically to TarFormat::TarGz, applying gzip decompression. This mismatch causes files with unknown extensions (classified as Raw) to be processed as gzipped tar files, leading to decompression failures for non-compressed or non-gzipped files. This regression affects code paths using TarFormat::Auto on unknown extensions, breaking the previous fallback to tar.gz.

src/file.rs#L653-L662

mise/src/file.rs

Lines 653 to 662 in bc805ff

match ext {
"gz" | "tgz" => TarFormat::TarGz,
"xz" | "txz" => TarFormat::TarXz,
"bz2" | "tbz2" => TarFormat::TarBz2,
"zst" | "tzst" => TarFormat::TarZst,
"zip" => TarFormat::Zip,
_ => TarFormat::Raw,
}
}
}

src/file.rs#L745-L747

mise/src/file.rs

Lines 745 to 747 in bc805ff

Ok(match format {
// TODO: we probably shouldn't assume raw is tar.gz, but this was to retain existing behavior
TarFormat::TarGz | TarFormat::Raw => Box::new(GzDecoder::new(f)),

Fix in CursorFix in Web


Was this report helpful? Give feedback by reacting with 👍 or 👎