-
Notifications
You must be signed in to change notification settings - Fork 342
[BUG] Unzip specific folder feature is broken after introducing 7zip #406
Comments
I can supply the patch if you agree it's broken :) |
I say go ahead! I added the -specificfolder switch before we went 7za so imho it's a regression. |
Can I use pester to mock the |
yes.
|
OMG, it's that easy, huh? I guess powershell isn't treating native commands differently than cmdlets, it's interpreting everything and if it finds my mock first, I win, right? Actually... am I able to mock a full file path? The script joins together everything down to the $7zip = Join-Path "$env:ChocolateyInstall" 'chocolateyinstall\tools\7za.exe' Nevermind, I'm mocking |
You win!! :) Yeah as long as you can do a
it should work. Pester creates a proxy command and hides the original command. |
Undocumented means unsupported ;) |
AKA dark features. Actually I think this is probably undocumented b/c it's something we may have missed documenting... :( |
I'll take care of that too ;) |
@AnthonyMastrean Did I miss the PR? |
Nah, life attacked and I haven't gotten around to it or a million other things I want to work on ;) I do remember my initial patch not working entirely (there's a lot of quoting/escaping going on in the line in question). But, this can be a good reminder to get on it. |
I'm going to bump this to the next version while waiting for updates. |
When is solved this issue?? |
Migrated to chocolatey/choco#676 |
I'm updating a package that downloads an archive with x64 and Win32 subdirectories. I used to extract the entire thing and manually remove the unneeded components. But, I figured I would try the as-yet undocumented
-specificFolder
parameter ofInstall-ChocolateyZipPackage
.But, it didn't work. The first thing I saw was a goofy log message. Look at the "full path" in bold. It contains a non-path
And, digging in the source, I saw a bad 7za command line being constructed
From my reading of the command line reference, and hacking my helper function, the correct command line should be...
And, actually, with this fix, you could supply any glob pattern to 7za, not just a specific folder.
The text was updated successfully, but these errors were encountered: