-
-
Notifications
You must be signed in to change notification settings - Fork 1.4k
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
[Regression][develop] Expand-ZipArchive cannot remove already removed archive #3473
Comments
Yes, fixed in #3472 😂
|
Why so complicated? You could just add |
I try to do so in #3470, and in fact, But this failed when Then I tried So finanlly I choose to use For PowerShell Core, |
For some `extract_dir` in .zip that has sub-dir, the former one would remove parent dir and get error (flac, flac-1.3.2-win\win64), now use temp dir instead. And also fix .msi, in case of some installer that don't have `SourceDir`. `Expand-DarkArchive` will be used in wix extraction, so it doesn't need `-ExtractDir`. `Expand-7zipArchive` and `Expand-InnoArchive` works well. Tested: - calibre-normal (msi, PFiles\Calibre2) - flac (zip, flac-1.3.2-win\win64) - pkg-config (zip, multiple url and extract_dir) BTW, `Expand-Archive` has `-PassThru` param in PowerShell 6+, and it will be more convinient to support `-ExtractDir` with it. I'll check function's source code and plan to rewrite `Expand-ZipArchive`. Fix #3473, ref #3473 (comment)
Cause:
https://github.com/lukesampson/scoop/blob/f5fdc275ca27166c7fd862932f4ad2e124708f20/lib/decompress.ps1#L238-L246
If there is
extract_dir
property set, archive is deleted twice.first in
gci -exclude $ExtractDir | Remove
then in
if ($Removal)
/cc @niheaven
The text was updated successfully, but these errors were encountered: