Skip to content
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions src/file.rs
Original file line number Diff line number Diff line change
Expand Up @@ -735,6 +735,7 @@ impl TarFormat {
"bz2" | "tbz2" => TarFormat::TarBz2,
"zst" | "tzst" => TarFormat::TarZst,
"zip" => TarFormat::Zip,
"vsix" => TarFormat::Zip,

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

medium

While adding .vsix to from_ext correctly enables extraction for the HTTP backend, this change appears to be incomplete as other parts of the codebase still use hardcoded extension lists for archive handling:

  1. is_archive_format (line 553 in src/cli/generate/tool_stub.rs): This function needs to include .vsix so that mise generate tool-stub can correctly identify these files as archives and attempt to auto-detect the binary path within them.
  2. AssetPicker::score_build_penalties (line 356 in src/backend/asset_matcher.rs): There is a -100 penalty explicitly for .vsix files. Now that they are supported as valid archives, this penalty should likely be removed or reduced so that .vsix assets can be correctly auto-detected when they are the primary distribution format for a tool.
  3. open_tar (line 898 in src/file.rs): The Auto match arm should be updated to handle vsix (similar to zip) to avoid falling through to the default TarGz case, which would lead to confusing errors if content inspection is attempted on a VSIX file.

Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think we need to handle 1 and 3 here

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

on it, my bad i oversaw that

Copilot AI Feb 22, 2026

Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This adds a new extension→format mapping; please add a small unit test to lock in the behavior (e.g., asserting TarFormat::from_ext("vsix") resolves to TarFormat::Zip). This file already has a #[cfg(test)] module, so it should be straightforward to extend and will prevent regressions in future refactors of from_ext.

Copilot uses AI. Check for mistakes.
"7z" => TarFormat::SevenZip,
_ => TarFormat::Raw,
}
Expand Down
Loading