Method: Specinfra::Command::Windows::Base::File.check_has_version

Defined in:
lib/specinfra/command/windows/base/file.rb

.check_has_version(name, version) ⇒ Object

[View source]

104
105
106
107
# File 'lib/specinfra/command/windows/base/file.rb', line 104

def check_has_version(name,version)
  cmd = "((Get-Command '#{name}').FileVersionInfo.ProductVersion -eq '#{version}') -or ((Get-Command '#{name}').FileVersionInfo.FileVersion -eq '#{version}')"
  Backend::PowerShell::Command.new { exec cmd }
end