Class: SimplyGenius::Atmos::Commands::AuthExec
- Inherits:
-
BaseCommand
- Object
- Clamp::Command
- BaseCommand
- SimplyGenius::Atmos::Commands::AuthExec
show all
- Defined in:
- lib/simplygenius/atmos/commands/auth_exec.rb
Class Method Summary
collapse
Instance Method Summary
collapse
Methods included from UI
#agree, #ask, #choose, color_enabled, color_enabled=, #display, #error, #notify, #say, #warn
Class Method Details
.description ⇒ Object
10
11
12
|
# File 'lib/simplygenius/atmos/commands/auth_exec.rb', line 10
def self.description
"Exec subprocess with an authenticated environment"
end
|
Instance Method Details
#execute ⇒ Object
19
20
21
22
23
24
25
26
27
28
|
# 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
|