2013-06-17 21:17:31 +00:00
|
|
|
module VagrantPlugins
|
|
|
|
module Cachier
|
|
|
|
module Cap
|
|
|
|
module Linux
|
2013-06-25 19:51:59 +00:00
|
|
|
module RvmPath
|
|
|
|
def self.rvm_path(machine)
|
|
|
|
rvm_path = nil
|
2013-06-17 21:17:31 +00:00
|
|
|
machine.communicate.tap do |comm|
|
|
|
|
return unless comm.test('rvm info')
|
|
|
|
comm.execute 'echo $rvm_path' do |buffer, output|
|
2013-06-25 19:51:59 +00:00
|
|
|
rvm_path = output.chomp if buffer == :stdout
|
2013-06-17 21:17:31 +00:00
|
|
|
end
|
|
|
|
end
|
2013-06-25 19:51:59 +00:00
|
|
|
return rvm_path
|
2013-06-17 21:17:31 +00:00
|
|
|
end
|
|
|
|
end
|
|
|
|
end
|
|
|
|
end
|
|
|
|
end
|
|
|
|
end
|
|
|
|
|