Skip to content

Commit ccc0291

Browse files
committed
fix: Update command expecting gzip
1 parent 7d9c293 commit ccc0291

1 file changed

Lines changed: 3 additions & 3 deletions

File tree

internal/command/update.go

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -159,7 +159,7 @@ func replaceExecutable(url string) error {
159159
}
160160
defer os.Remove(archive)
161161

162-
binary, err := extractBinary(archive)
162+
binary, err := extractBinary(archive, url)
163163
if err != nil {
164164
return err
165165
}
@@ -204,8 +204,8 @@ func downloadFile(url string) (string, error) {
204204
return tmp.Name(), nil
205205
}
206206

207-
func extractBinary(archive string) ([]byte, error) {
208-
if strings.HasSuffix(archive, ".zip") {
207+
func extractBinary(archive string, url string) ([]byte, error) {
208+
if strings.HasSuffix(url, ".zip") {
209209
return extractFromZip(archive)
210210
}
211211
return extractFromTarGz(archive)

0 commit comments

Comments
 (0)