-
Notifications
You must be signed in to change notification settings - Fork 9.6k
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
getmodules: support tbz2
module archives
#36081
Conversation
The `tbz2` extension, a shorthand for `tar.bz2`, is supported for downloading and handling compressed archives in go-getter, which already treats both `tbz2` and `tar.bz2` as using the same bzip2 decompressor. This commit adds support for the `tbz2` decompressor when fetching modules from a source. Signed-off-by: Bruno Schaatsbergen <git@bschaatsbergen.com>
- Grouped decompressor extensions (bz2, gzip, xz, zip). - Grouped getters (protocol-based, cloud storage, version control, file-based). Signed-off-by: Bruno Schaatsbergen <git@bschaatsbergen.com>
|
||
// Bzip2 | ||
"bz2": new(getter.Bzip2Decompressor), | ||
"tbz2": new(getter.TarBzip2Decompressor), |
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.
For clarity, this is the tbz2
decompressor I'm adding.
Signed-off-by: Bruno Schaatsbergen <git@bschaatsbergen.com>
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.
Added oxford commas, but besides that this look good from a style perspective ✨
Co-authored-by: Rose M Koron <32436232+rkoron007@users.noreply.github.com>
Co-authored-by: Rose M Koron <32436232+rkoron007@users.noreply.github.com>
Co-authored-by: Rose M Koron <32436232+rkoron007@users.noreply.github.com>
Co-authored-by: Rose M Koron <32436232+rkoron007@users.noreply.github.com>
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.
LGTM 👍
Reminder for the merging maintainer: if this is a user-visible change, please update the changelog on the appropriate release branch. |
I'm going to lock this pull request because it has been closed for 30 days ⏳. This helps our maintainers find and focus on the active contributions. |
Closes #36080
Our documentation suggests that files with the
tar.bz2
,tar.tbz2
andtbz2
extension can be fetched, unpacked and used as modules—howevertbz2
is currently not supported.In go-getter there is a decompressor for tar archives compressed with bzip2 that can handle both
tar.bz2
,tar.tbz2
andtbz2
files. See https://github.com/hashicorp/go-getter/blob/main/decompress_tbz2.go#L28-L48This PR adds
tbz2
files, enabling the unpacking oftbz2
module archives