Skip to content

Commit b16ccd6

Browse files
authored
add .tgz support (#17)
* add .tgz support * simplify matching switch case condition
1 parent acccd3b commit b16ccd6

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

DOCS.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -74,7 +74,7 @@ of permissions within the archive.
7474

7575
Eget supports the following filetypes for assets:
7676

77-
* `.tar.gz`: tar archive with gzip compression.
77+
* `.tar.gz`/`.tgz`: tar archive with gzip compression.
7878
* `.tar.bz2`: tar archive with bzip2 compression.
7979
* `.tar.xz`: tar archive with xz compression.
8080
* `.tar`: tar archive with no compression.

extract.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -77,7 +77,7 @@ func NewExtractor(filename string, tool string, chooser Chooser) Extractor {
7777
}
7878

7979
switch {
80-
case strings.HasSuffix(filename, ".tar.gz"):
80+
case strings.HasSuffix(filename, ".tar.gz"), strings.HasSuffix(filename, ".tgz"):
8181
return &TarExtractor{
8282
File: chooser,
8383
Decompress: gunzipper,

0 commit comments

Comments
 (0)