Module: VagrantPlugins::Cachier::Cap::Linux::BowerPath

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

Class Method Summary collapse

Class Method Details

.bower_path(machine) ⇒ Object



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

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