vagrant-cachier-ng/lib/vagrant-cachier/cap/linux/bower_path.rb
Sébastien LECACHEUR 973d5d1a8f Add support for Bower
2014-10-04 01:34:44 +02:00

21 lines
524 B
Ruby

module VagrantPlugins
module Cachier
module Cap
module Linux
module BowerPath
def self.bower_path(machine)
bower_path = nil
machine.communicate.tap do |comm|
return unless comm.test('which bower')
comm.execute 'echo $HOME' do |buffer, output|
bower_path = output.chomp if buffer == :stdout
end
end
return "#{bower_path}/.cache/bower"
end
end
end
end
end
end