From f5e0c12bb9c4da861a4cfcde595ba2f5ed9cf03f Mon Sep 17 00:00:00 2001 From: Matt Kulka Date: Thu, 24 Aug 2023 13:09:18 -0700 Subject: [PATCH] use the -S flag with bsdtar for sparse extraction of boxes --- lib/vagrant/box_collection.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/vagrant/box_collection.rb b/lib/vagrant/box_collection.rb index 005ed6783..2e09bc1c1 100644 --- a/lib/vagrant/box_collection.rb +++ b/lib/vagrant/box_collection.rb @@ -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