mirror of https://github.com/hashicorp/packer
Merge pull request #6085 from hashicorp/tar-go
conditionally set tar header on go >= 1.10pull/6087/head
commit
b97a36a5c7
@ -0,0 +1,9 @@
|
||||
// +build !go1.10
|
||||
|
||||
package vagrant
|
||||
|
||||
import "archive/tar"
|
||||
|
||||
func setHeaderFormat(header *tar.Header) {
|
||||
// no-op
|
||||
}
|
||||
@ -0,0 +1,12 @@
|
||||
// +build go1.10
|
||||
|
||||
package vagrant
|
||||
|
||||
import "archive/tar"
|
||||
|
||||
func setHeaderFormat(header *tar.Header) {
|
||||
// We have to set the Format explicitly because of a bug in
|
||||
// libarchive. This affects eg. the tar in macOS listing huge
|
||||
// files with zero byte length.
|
||||
header.Format = tar.FormatGNU
|
||||
}
|
||||
Loading…
Reference in new issue