tools/terraform-bundle: compress files in the generated zip file

The FileInfoHeader method does not compress files by default.
This commit is contained in:
Andrew Bloomgarden 2018-04-06 22:16:25 -04:00 committed by Martin Atkins
parent fdc74f96cc
commit d9b315564e
1 changed files with 1 additions and 0 deletions

View File

@ -234,6 +234,7 @@ func (c *PackageCommand) Run(args []string) int {
c.ui.Error(fmt.Sprintf("Failed to add zip entry for %s: %s", fn, err))
return 1
}
hdr.Method = zip.Deflate // be sure to compress files
w, err := outZ.CreateHeader(hdr)
if err != nil {
c.ui.Error(fmt.Sprintf("Failed to add zip entry for %s: %s", fn, err))