Merge pull request #21 from pieterclaerhout/master

Update detect.go to add support for tgz files
This commit is contained in:
Linda_pp 2019-10-20 00:30:02 +09:00 committed by GitHub
commit c328ee2035
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 1 additions and 1 deletions

View File

@ -72,7 +72,7 @@ func findReleaseAndAsset(rels []*github.RepositoryRelease, targetVersion string)
// Generate candidates
suffixes := make([]string, 0, 2*7*2)
for _, sep := range []rune{'_', '-'} {
for _, ext := range []string{".zip", ".tar.gz", ".gzip", ".gz", ".tar.xz", ".xz", ""} {
for _, ext := range []string{".zip", ".tar.gz", ".tgz", ".gzip", ".gz", ".tar.xz", ".xz", ""} {
suffix := fmt.Sprintf("%s%c%s%s", runtime.GOOS, sep, runtime.GOARCH, ext)
suffixes = append(suffixes, suffix)
if runtime.GOOS == "windows" {