class YleTfPlugins::CommandVersion::Command

Public Instance Methods

execute(_env) click to toggle source
# File lib/yle_tf_plugins/commands/version/command.rb, line 9
def execute(_env)
  puts "YleTf #{YleTf::VERSION}"
  puts terraform_version
end
terraform_version() click to toggle source
# File lib/yle_tf_plugins/commands/version/command.rb, line 14
def terraform_version
  on_error = proc { return '[Terraform not found]' }
  v = YleTf::System.read_cmd('terraform', 'version', error_handler: on_error)
  v.lines.first
end