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

Add support for tar archives #19

Closed
ketzacoatl opened this issue Apr 10, 2016 · 9 comments · Fixed by #138
Closed

Add support for tar archives #19

ketzacoatl opened this issue Apr 10, 2016 · 9 comments · Fixed by #138

Comments

@ketzacoatl
Copy link
Contributor

Some projects distribute with .zip or .tgz, others have only a .tar (example: https://github.com/AcalephStorage/consul-alerts distributes https://bintray.com/artifact/download/darkcrux/generic/consul-alerts-latest-linux-amd64.tar)

It seems that the go-getter library only supports .tgz or .bz2, but not uncompressed .tar by itself.

@mitchellh
Copy link
Contributor

This would be simple enough. No short term plans to knock this out but if anyone wants to take a look at how the other decompressors work and their respective tests, I think you'll find its quite easy to implement. I'm sure we'll do it sometime "soon" though, since it does seem like a no-brainer!

@ketzacoatl
Copy link
Contributor Author

You are totally right @mitchellh, given what's in place, this is the simplest exercise in go. I have very little skill with go, but I will see what I can do on my own.

@ketzacoatl
Copy link
Contributor Author

OK, I think I have it (at least it builds and tests pass), but what would be a reasonable way to test this updated build either locally with Terraform or on a remote cluster with Nomad?

ketzacoatl added a commit to ketzacoatl/go-getter that referenced this issue Apr 11, 2016
This passes the tests, but I am not a go developer and success may not
mean much. See hashicorp#19.
@ketzacoatl
Copy link
Contributor Author

No pressure here, but I'm curious if I did this correctly?

@ketzacoatl
Copy link
Contributor Author

no pressure, but I am still curious.

@ketzacoatl
Copy link
Contributor Author

With https://github.com/hashicorp/go-getter/blob/master/decompress_tar.go, does go-getter now support decompressing .tar archives? Is this issue good to close?

@upccup
Copy link

upccup commented Feb 26, 2019

now i use go-getter download foo.tar.gz file with http link. it still report ERROR: archive: gzip: invalid header.

the foo.tar.gz is created by tar -cvf foo.tar.gz bar

@ketzacoatl
Copy link
Contributor Author

@dadgar, can this get a review, is it still relevant?

schmichael added a commit that referenced this issue Jun 29, 2021
Asked for in #19, added in #138, and now exported to match others
@ketzacoatl
Copy link
Contributor Author

Yay! Thanks @schmichael!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants