2013-10-21 09:17:59 +00:00
|
|
|
module VagrantPlugins
|
|
|
|
module Cachier
|
|
|
|
module Cap
|
|
|
|
module Linux
|
2013-10-22 15:51:45 +00:00
|
|
|
module ComposerPath
|
2013-10-21 09:17:59 +00:00
|
|
|
def self.composer_path(machine)
|
2013-10-22 15:51:45 +00:00
|
|
|
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
|
2014-07-21 00:11:19 +00:00
|
|
|
return "#{composer_path}/.composer/cache"
|
2013-10-21 09:17:59 +00:00
|
|
|
end
|
|
|
|
end
|
|
|
|
end
|
|
|
|
end
|
|
|
|
end
|
|
|
|
end
|