Consume our moby fork

It handles #91
This commit is contained in:
Ettore Di Giacinto
2020-04-18 11:41:34 +02:00
parent ee0fe1a86a
commit 64bac0823c
3 changed files with 115 additions and 4 deletions

View File

@@ -67,11 +67,13 @@ func Untar(src, dest string, sameOwner bool) error {
// Probably it's needed set this always to true.
NoLchown: true,
ExcludePatterns: []string{"dev/"}, // prevent 'operation not permitted'
ContinueOnError: true,
}
ans = archive.Untar(in, dest, opts)
} else {
// TODO: replace with https://github.com/mholt/archiver ?
var fileReader io.ReadCloser = in
tr := tar.NewReader(fileReader)