aboutsummaryrefslogtreecommitdiffhomepage
path: root/internal/pkg
diff options
context:
space:
mode:
Diffstat (limited to 'internal/pkg')
-rw-r--r--internal/pkg/tar.go7
1 files changed, 7 insertions, 0 deletions
diff --git a/internal/pkg/tar.go b/internal/pkg/tar.go
index 1ce30383..33f26f3a 100644
--- a/internal/pkg/tar.go
+++ b/internal/pkg/tar.go
@@ -3,6 +3,7 @@ package pkg
import (
"archive/tar"
"bytes"
+ "compress/bzip2"
"compress/gzip"
"context"
"encoding/binary"
@@ -21,6 +22,8 @@ const (
TarUncompressed = iota
// TarGzip denotes a tarball compressed via [gzip].
TarGzip
+ // TarBzip2 denotes a tarball compressed via [bzip2].
+ TarBzip2
)
// A tarArtifact is an [Artifact] unpacking a tarball backed by a [File].
@@ -100,6 +103,10 @@ func (a *tarArtifact) Cure(c *CureContext) (err error) {
}
break
+ case TarBzip2:
+ tr = io.NopCloser(bzip2.NewReader(tr))
+ break
+
default:
return os.ErrInvalid
}