Permalink
Browse files

untar fails with github tarballs that have no extension, such as the …

…/tarball/master urls. This just tries a best-effort tar -z on such tarballs instead of immediately failing.
  • Loading branch information...
avsm committed Sep 24, 2012
1 parent 6dc51bf commit ff19765940fd09fb0fa6a834ad231f0ffb7b1e98
Showing with 3 additions and 1 deletion.
  1. +3 −1 src/run.ml
View
@@ -278,7 +278,9 @@ module Tar = struct
let extensions =
[ [ "tar.gz" ; "tgz" ], 'z'
- ; [ "tar.bz2" ; "tbz" ], 'j' ]
+ ; [ "tar.bz2" ; "tbz" ], 'j'
+ ; [ "" ], 'z'
+ ]
let match_ext file ext =
List.exists (Filename.check_suffix file) ext

0 comments on commit ff19765

Please sign in to comment.