class SimplyGenius::Atmos::Commands::AuthExec

Public Class Methods

description() click to toggle source
# File lib/simplygenius/atmos/commands/auth_exec.rb, line 10
def self.description
  "Exec subprocess with an authenticated environment"
end

Public Instance Methods

execute() click to toggle source
# File lib/simplygenius/atmos/commands/auth_exec.rb, line 19
def execute
  Atmos.config.provider.auth_manager.authenticate(ENV, role: role) do |auth_env|
    result = system(auth_env, *command)
    if ! result
      logger.error("Process failed: #{command}")
      exit(1)
    end
  end

end