Module: VagrantPlugins::Cachier::Cap::Linux::ComposerPath

Defined in:
lib/vagrant-cachier/cap/linux/composer_path.rb

Class Method Summary collapse

Class Method Details

.composer_path(machine) ⇒ Object



6
7
8
9
10
11
12
13
14
15
# File 'lib/vagrant-cachier/cap/linux/composer_path.rb', line 6

def self.composer_path(machine)
  composer_path = nil
  machine.communicate.tap do |comm|
    return unless comm.test('which php')
    comm.execute 'echo $HOME' do |buffer, output|
      composer_path = output.chomp if buffer == :stdout
    end
  end
  return "#{composer_path}/.composer/cache"
end