Class: Itamae::Plugin::Resource::RvmExecute

Inherits:
Resource::Execute
  • Object
show all
Defined in:
lib/itamae/plugin/resource/rvm_execute.rb

Instance Method Summary collapse

Instance Method Details

#action_run(options) ⇒ Object



13
14
15
16
# File 'lib/itamae/plugin/resource/rvm_execute.rb', line 13

def action_run(options)
  attributes.command = "#{current.rvm_shell} #{attributes.rvm_use} -c '#{attributes.command}'"
  super
end

#set_current_attributesObject



5
6
7
8
9
10
11
# File 'lib/itamae/plugin/resource/rvm_execute.rb', line 5

def set_current_attributes
  run_command('/bin/bash --login -c "which rvm-shell"', error: false)
    .stdout.strip.each_line do |line|
      current.rvm_shell = line
  end
  super
end