Skip to content

feat: support extracting 7z archives for static backends#5632

Merged
jdx merged 5 commits into
jdx:mainfrom
yjoer:patch-1
Jul 15, 2025
Merged

feat: support extracting 7z archives for static backends#5632
jdx merged 5 commits into
jdx:mainfrom
yjoer:patch-1

refactor: panic when encountering 7z archives on non-windows platforms

b672276
Select commit
Loading
Failed to load commit list.
Cursor / Cursor BugBot completed Jul 15, 2025 in 1m 43s

BugBot Review

BugBot Analysis Progress (1m 45s elapsed)

✅ Gathered PR context (1s)
✅ Analyzed code changes (1s)
✅ Completed bug detection — 1 potential bug found (1m 40s)
✅ Validation and filtering completed (0s)
✅ Posted analysis results — 1 bug reported (2s)
✅ Analysis completed successfully (0s)

Final Result: BugBot completed review and found 1 potential issue

Request ID: serverGenReqId_5598a27c-f65a-46f8-8bee-5bae69e8001f

Details

Bug: 7z Extraction Error on Non-Windows

On non-Windows platforms, 7z archive extraction fails. The #[cfg(windows)] directive guards the un7z call, causing the code to fall through to generic tar extraction logic. This results in incorrect processing and confusing errors. An explicit #[cfg(not(windows))] branch is needed to return an error or unimplemented!(), consistent with inspect_7z_contents.

src/file.rs#L689-L699

mise/src/file.rs

Lines 689 to 699 in b672276

);
} else if format == TarFormat::SevenZip {
#[cfg(windows)]
return un7z(
archive,
dest,
&SevenZipOptions {
strip_components: opts.strip_components,
},
);
}

Fix in CursorFix in Web


BugBot free trial expires on July 22, 2025
Learn more in the Cursor dashboard.

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