Sha256: 71a627bd65ca4d9ab12a850ac9bd48c087cfed740d76077b84999268af414ded
Contents?: true
Size: 508 Bytes
Versions: 7
Compression:
Stored size: 508 Bytes
Contents
set :chruby_path, '/etc/profile.d/chruby.sh' task :chruby, :env do |_, args| unless args[:env] puts "Task 'chruby' needs a Ruby version as an argument." puts "Example: invoke :'chruby[ruby-1.9.3-p392]'" exit 1 end comment %{chruby to version: \\"#{args[:env]}\\"} command %{ if [[ ! -s "#{fetch(:chruby_path)}" ]]; then echo "! chruby.sh init file not found" exit 1 fi } command %{source #{fetch(:chruby_path)}} command %{chruby "#{args[:env]}" || exit 1} end
Version data entries
7 entries across 7 versions & 1 rubygems