Skip to content

Commit

Permalink
Fix Vagrant to add workaround for Windows mounting '/var/cache/apt'
Browse files Browse the repository at this point in the history
  • Loading branch information
igal committed Nov 12, 2011
1 parent a1ae88e commit afe8b31
Showing 1 changed file with 6 additions and 3 deletions.
9 changes: 6 additions & 3 deletions Vagrantfile
Original file line number Diff line number Diff line change
Expand Up @@ -36,9 +36,12 @@ Vagrant::Config.run do |config|
# Share a folder with the guest VM for storing downloaded packages. This
# makes rebuilding VMs faster by only downloading packages if needed.
require "fileutils"
apt_cache = "tmp/vagrant_apt_cache"
FileUtils.mkdir_p("#{apt_cache}/archives/partial")
config.vm.share_folder "vagrant-apt-cache", "/var/cache/apt", apt_cache, :nfs => defined?(NFS) ? NFS : false
require "rbconfig"
unless RbConfig::CONFIG['host_os'] =~ /mswin|mingw/
apt_cache = "tmp/vagrant_apt_cache"
FileUtils.mkdir_p("#{apt_cache}/archives/partial")
config.vm.share_folder "vagrant-apt-cache", "/var/cache/apt", apt_cache, :nfs => defined?(NFS) ? NFS : false
end

# Use more memory so badly-designed programs like Bundler can work.
config.vm.customize do |vm|
Expand Down

0 comments on commit afe8b31

Please sign in to comment.