Skip to content

Conversation

@vexx32
Copy link
Member

@vexx32 vexx32 commented Sep 30, 2025

Description Of Changes

  • Removed Get-ChocolateyUnzip function
  • Added Expand-ChocolateyArchive cmdlet
  • Added useBuiltinCompression feature to bypass 7zip if needed
  • Added aliases for the command and any renamed parameters
  • Added tests to validate the functionality

Motivation and Context

#3477

Testing

  1. build the project
  2. run the tests with ./Invoke-Tests.ps1

Operating Systems Testing

Win11

Change Types Made

  • Bug fix (non-breaking change).
  • Feature / Enhancement (non-breaking change).
  • Breaking change (fix or feature that could cause existing functionality to change).
  • Documentation changes.
  • PowerShell code changes.

Change Checklist

Related Issue

Fixes #3635

See also #3477

@AdmiringWorm
Copy link
Member

I haven't looked at the code yet, but I was curious whether we want the name of the environment variable, feature and/or parameter to be consistent with what we are using during the initial installation of Chocolatey CLI?

If so, the environment variable we have then is called: chocolateyUseWindowsCompression, with the parameter name UseNativeUnzip.

@vexx32
Copy link
Member Author

vexx32 commented Oct 31, 2025

I'm not really tied to the specific names we chose for the PR, but. As for those, I did avoid naming it similarly somewhat deliberately;

  • chocolateyUseWindowsCompression - I don't like this name, it has nothing (directly?) to do with the Windows API, it's using .NET APIs
  • UseNativeUnzip - Somewhat better, but "native" in a programming context often has specific meanings that are not relevant / applicable here either. We are using managed code, not native code.

If we were to rename the feature/parameter I would probably suggest the better alternate name is something about disabling the usage of 7zip, it's better to be explicit about what it does than vague IMO.

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