use the -S flag with bsdtar for sparse extraction of boxes

This commit is contained in:
Matt Kulka 2023-08-24 13:09:18 -07:00
parent a7135c000b
commit f5e0c12bb9
No known key found for this signature in database

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