Class: Kompo::RubyBuildPath::Installed

Inherits:
Taski::Task
  • Object
show all
Defined in:
lib/kompo/tasks/ruby_build_path.rb

Overview

Use existing ruby-build installation

Instance Method Summary collapse

Instance Method Details

#runObject



27
28
29
30
31
32
33
# File 'lib/kompo/tasks/ruby_build_path.rb', line 27

def run
  path_output, = Open3.capture2("which", "ruby-build", err: File::NULL)
  @path = path_output.chomp
  puts "ruby-build path: #{@path}"
  version_output, = Open3.capture2(@path, "--version", err: File::NULL)
  puts "ruby-build version: #{version_output.chomp}"
end