Fix package to probably put output box in pwd

This commit is contained in:
Mitchell Hashimoto 2013-02-04 10:38:50 -08:00
parent 55c905b43b
commit b568ad0b8a
1 changed files with 5 additions and 1 deletions

View File

@ -78,13 +78,17 @@ module Vagrant
# Copy over the included files
copy_include_files
# Get the output path. We have to do this up here so that the
# pwd returns the proper thing.
output_path = tar_path.to_s
# Switch into that directory and package everything up
Dir.chdir(@env["package.directory"]) do
# Find all the files in our current directory and tar it up!
files = Dir.glob(File.join(".", "**", "*"))
# Package!
Util::Subprocess.execute("bsdtar", "-czf", tar_path.to_s, *files)
Util::Subprocess.execute("bsdtar", "-czf", output_path, *files)
end
end