Class: YleTfPlugins::CommandDefault::Command
- Inherits:
-
Object
- Object
- YleTfPlugins::CommandDefault::Command
- Defined in:
- lib/yle_tf_plugins/commands/__default/command.rb
Instance Method Summary collapse
Instance Method Details
#color?(env) ⇒ Boolean
17 18 19 |
# File 'lib/yle_tf_plugins/commands/__default/command.rb', line 17 def color?(env) !env[:tf_options][:no_color] end |
#execute(env) ⇒ Object
7 8 9 10 11 12 13 14 15 |
# File 'lib/yle_tf_plugins/commands/__default/command.rb', line 7 def execute(env) command = env[:tf_command] args = env[:tf_command_args].dup args << '-no-color' if !color?(env) YleTf::Logger.info "Running `terraform #{command}`" YleTf::System.console_cmd('terraform', command, *args) end |