chocolatey / chocolatey/choco

Ability to use Get-ChocolateyUnzip with "Extract"[e] instead of "eXtract with full paths"[x] -- 7z (cmd)

Open
#1,824 10 comments 0 reactions 0 assignees View on GitHub
0 - Triaging Enhancement
Dominant language
C#
Stars
11.5k
Forks
960
PR merge metrics
No merged PRs in 30d

Description

Current situation when using `Get-ChocolateyUnzip` the 7z command that gets executed is "x":
* `7z.exe x` which means "eXtract with full paths"
Ability to change this to "e" could be beneficial for download/zip files which contain folders and only files (not folders) from the archive are needed, example:
* `7z.exe e` which means "Extract"

I could not find workaround this issue.

One could try to use move commands after unzip but that defeats the intended functionality?

Contributor guide

Open the contributing guide

Research direction

Start by locating Get-ChocolateyUnzip and the 7z.exe command it executes, then inspect how archive extraction arguments are selected. Define how callers would request the "e" mode instead of "x", and verify that archives containing folders produce the intended file-only extraction behavior.

Written by the indexing model from the issue text.

Assessment

Tech stack
csharp, powershell
Domain
cli
Issue type
Feature
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
45/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.