Module: VagrantPlugins::Cachier::Cap::Linux::RvmPath

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

Class Method Summary collapse

Class Method Details

.rvm_path(machine) ⇒ Object



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

def self.rvm_path(machine)
  rvm_path = nil
  machine.communicate.tap do |comm|
    return unless comm.test('rvm info')
    comm.execute 'echo $rvm_path' do |buffer, output|
      rvm_path = output.chomp if buffer == :stdout
    end
  end
  return rvm_path
end