Class: YleTfPlugins::CommandVersion::Command

Inherits:
Object
  • Object
show all
Defined in:
lib/yle_tf_plugins/commands/version/command.rb

Instance Method Summary collapse

Instance Method Details

#execute(_env) ⇒ Object



8
9
10
11
# File 'lib/yle_tf_plugins/commands/version/command.rb', line 8

def execute(_env)
  puts "YleTf #{YleTf::VERSION}"
  puts terraform_version
end

#terraform_versionObject



13
14
15
16
17
# File 'lib/yle_tf_plugins/commands/version/command.rb', line 13

def terraform_version
  `terraform version`.lines.first
rescue Errno::ENOENT
  '[Terraform not found]'
end