decompressor: add support for bz2 (#15424)

This commit is contained in:
Christoph Junghans 2020-03-10 10:46:45 -06:00 committed by GitHub
parent 7118e24664
commit 577860761b
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -32,6 +32,9 @@ def decompressor_for(path, extension=None):
if extension and re.match(r'gz', extension):
gunzip = which('gunzip', required=True)
return gunzip
if extension and re.match(r'bz2', extension):
bunzip2 = which('bunzip2', required=True)
return bunzip2
tar = which('tar', required=True)
tar.add_default_arg('-xf')
return tar