module VagrantPlugins::Cachier::Cap::Debian::AptCacherDir

Constants

CACHER_CACHE_DIR
CACHER_CONF

Public Class Methods

apt_cacher_dir(machine) click to toggle source
# File lib/vagrant-cachier/cap/debian/apt_cacher_dir.rb, line 9
def self.apt_cacher_dir(machine)
  cache_dir = nil
  machine.communicate.tap do |comm|
    return unless comm.test("test -f #{CACHER_CONF}")
    comm.execute "echo #{CACHER_CACHE_DIR}" do |buffer, output|
      cache_dir = output.chomp if buffer == :stdout
    end
  end
  return cache_dir
end