vagrant-cachier-ng/lib/vagrant-cachier/cap/linux/rvmdir.rb
2013-06-17 17:17:31 -04:00

22 lines
489 B
Ruby

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