Class: AwsAssumeRole::Runner

Inherits:
Dry::Struct
  • Object
show all
Includes:
Logging
Defined in:
lib/aws_assume_role/runner.rb

Instance Method Summary collapse

Methods included from Logging

included

Constructor Details

#initialize(options) ⇒ Runner

Returns a new instance of Runner.



16
17
18
19
20
21
22
23
# File 'lib/aws_assume_role/runner.rb', line 16

def initialize(options)
    super(options)
    command_to_exec = command.map(&:shellescape).join(" ")
    process_credentials unless credentials.blank?
    system environment, command_to_exec
    exit_status = $CHILD_STATUS.exitstatus
    process_error(exit_status) if exit_status != expected_exit_code
end