class YleTfPlugins::CommandDefault::Command
Public Instance Methods
color?(env)
click to toggle source
# File lib/yle_tf_plugins/commands/__default/command.rb, line 19 def color?(env) !env[:tf_options][:no_color] end
execute(env)
click to toggle source
# File lib/yle_tf_plugins/commands/__default/command.rb, line 9 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