Merge pull request #13252 from mattlqx/sparse

use the -S flag with bsdtar for sparse extraction of boxes
This commit is contained in:
Chris Roberts 2023-09-08 16:17:34 -07:00 committed by GitHub
commit 910290f40a
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -121,7 +121,7 @@ module Vagrant
# Extract the box into a temporary directory.
@logger.debug("Unpacking box into temporary directory: #{temp_dir}")
result = Util::Subprocess.execute(
"bsdtar", "--no-same-owner", "--no-same-permissions", "-v", "-x", "-m", "-s", "|\\\\\|/|", "-C", temp_dir.to_s, "-f", path.to_s)
"bsdtar", "--no-same-owner", "--no-same-permissions", "-v", "-x", "-m", "-S", "-s", "|\\\\\|/|", "-C", temp_dir.to_s, "-f", path.to_s)
if result.exit_code != 0
raise Errors::BoxUnpackageFailure,
output: result.stderr.to_s