-
Notifications
You must be signed in to change notification settings - Fork 1.5k
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
Add more supports for tar extensions #48
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for the contribution! I left some comments, but overall I like the idea behind the change
expect(fs.existsSync(`${toolPath}.complete`)).toBeTruthy() | ||
expect(fs.existsSync(path.join(toolPath, 'file.txt'))).toBeTruthy() | ||
expect( | ||
fs.existsSync(path.join(toolPath, 'file-with-ç-character.txt')) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This shouldn't be an issue, but could you make the contents of the tar.gz and the tar.xz different? That way if somehow they got unzipped to the same location (which would be a different breakage that we should catch) we'll still see the error. Sorry if I'm being a little nitpicky here.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I've updated the tar.xz
to be different with tar.gz
and added file content checks on it.
Looks good to me, thanks for working with me on both PRs! |
Awesome 👍 |
Currently,
extractTar
only support for.tar.gz
, this PR remove flagz
on tar command to let it extract other extensions, liketar.xz
.Use case: I need it to create actions for Flutter, which flutter sdk has
.tar.xz
extension for its Linux distribution, like https://storage.googleapis.com/flutter_infra/releases/stable/linux/flutter_linux_v1.7.8+hotfix.4-stable.tar.xz.