Skip to content
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

Added zstd archive extraction based on tar installed by git package #4268

Closed
wants to merge 7 commits into from

Conversation

Airr
Copy link

@Airr Airr commented Feb 24, 2021

Added new function 'Expand-ZstdArchive'.

The only prerequisite for this to work is the installation of the zstd package.

Accesses the git-provided tar via "$scoopdir\apps\git\current\usr\bin\tar.exe"

Neither the native tar that comes with Windows, nor the tar package in scoop support zst extraction; only the git-provided version does.

I still need to put together a test-case for this, but it worked with a tweaked gcc package I have here.

$Removal
)

$TarPath = "$scoopdir\apps\git\current\usr\bin\tar.exe"
Copy link
Member

@rasa rasa Feb 24, 2021

Choose a reason for hiding this comment

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

This assumes that git was installed locally ($scoopdir) and not globally ($globaldir). See https://github.com/lukesampson/scoop/wiki/Pre--and-Post-install-scripts

Also, not all users will install git via scoop. I don't per #3877.

See also ScoopInstaller/Main#680.

Untested, but maybe a reliable way to find tar is (in git-bash):

tar="$(git --exec-path)/../../usr/bin/tar"

Copy link
Author

Choose a reason for hiding this comment

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

I see your points, thanks Rasa!

I pushed a change, to use zstd and the 'Expand-7zipArchive' function instead of using git-tar.

@nikitalita
Copy link

This is a giant blocker for updating packages, several of which are now broken. Please merge this.

@scrouthtv
Copy link

I just had a look at it myself, for me the tar.exe that comes with the tar package works if you also install the zstd package

@niheaven
Copy link
Member

Thanks for your job! Zstandard support has been added in #4372.

@niheaven niheaven closed this Nov 10, 2021
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.

5 participants