File tree Expand file tree Collapse file tree 1 file changed +1
-9
lines changed
Expand file tree Collapse file tree 1 file changed +1
-9
lines changed Original file line number Diff line number Diff line change @@ -275,14 +275,6 @@ func fixPermissions(root string) error {
275275}
276276
277277func downloadAndInstall (dl * GoDownload ) error {
278- unpacker , err := archiver .ByExtension (dl .Filename )
279- if err != nil {
280- return fmt .Errorf ("don't know how to unpack %s: %v" , dl .Filename , err )
281- }
282- u , ok := unpacker .(archiver.Unarchiver )
283- if ! ok {
284- return fmt .Errorf ("format specified by source filename is not an archive format: %s (%T)" , dl .Filename , unpacker )
285- }
286278 tmpfile , shasum , err := downloadFile (dl )
287279 if err != nil {
288280 return fmt .Errorf ("download failed: %v" , err )
@@ -305,7 +297,7 @@ func downloadAndInstall(dl *GoDownload) error {
305297 return fmt .Errorf ("couldn't remove gocache version in %s: %v" , gocachedir , err )
306298 }
307299 }
308- if err = u .Unarchive (tmpfile , * destGoDir ); err != nil {
300+ if err = archiver .Unarchive (tmpfile , * destGoDir ); err != nil {
309301 return fmt .Errorf ("can't unpack %s to %s: %v" , tmpfile , godir , err )
310302 }
311303 if _ , err = os .Stat (godir ); err != nil {
You can’t perform that action at this time.
0 commit comments