Skip to content

fix: Make extraction work for MSI files when unzip and 7zip installed #4973

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

captainreality
Copy link
Contributor

This commit fixes an issue where if both unzip and 7zip were installed, MSI file extraction failed because unzip was attempted first, and failed.

Now in the case where both are installed, unzip is tried, and if that fails, then 7zip is tried.

@captainreality captainreality marked this pull request as ready for review March 25, 2025 21:47
@captainreality captainreality changed the title Make extraction work for MSI files when unzip and 7zip installed. fix: Make extraction work for MSI files when unzip and 7zip installed Mar 26, 2025
@captainreality captainreality force-pushed the fix-msi-extract branch 2 times, most recently from 3b06e24 to 249f796 Compare March 31, 2025 21:42
@captainreality
Copy link
Contributor Author

See related bug at #4991

Copy link
Contributor

@terriko terriko left a comment

Choose a reason for hiding this comment

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

Thanks, this looks promising. I've set the tests to run and I'll be back to do more careful code review when they're passing.

This commit fixes an issue where if both unzip and 7zip were installed,
MSI file extraction failed because unzip was attempted first, and failed.

Now in the case where both are installed, unzip is tried, and if that
fails, then 7zip is tried.
@captainreality
Copy link
Contributor Author

captainreality commented Apr 26, 2025

Thanks, this looks promising. I've set the tests to run and I'll be back to do more careful code review when they're passing.

Hi @terriko, thanks for running tests. I'm a bit confused. When I run the failing tests locally (all except the Windows long tests), I get no errors if I run the tests individually. Specifically, these tests are test_html.py and test_csv2cve.py.

However, if I run the full test suite, test_csv2cve.py is failing. However, it's failing on a different line of code to the failure that occurred in the test suite run on the GitHub workflow. This is really strange.

I've attached two files; one with the output when the two tests pass when I run them individually, and one with the output when test_csv2cve fails.

I don't know if you've seen this before. It looks suspiciously like some kind of environment difference.
csv2cve_error.txt
test-out.txt

Anyhow, thanks for taking a look at this.

Edit... also note that when I ran the tests individually, I ran them with pytest, and also tried python -m pytest. It made no difference.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants