Class: Specinfra::Command::Windows::Base::Package

Inherits:
Specinfra::Command::Windows::Base show all
Defined in:
lib/specinfra/command/windows/base/package.rb

Class Method Summary collapse

Methods inherited from Specinfra::Command::Windows::Base

create

Class Method Details

.check_is_installed(package, version = nil) ⇒ Object



3
4
5
6
7
8
9
# File 'lib/specinfra/command/windows/base/package.rb', line 3

def check_is_installed(package, version=nil)
  version_selection = version.nil? ? "" : "-appVersion '#{version}'"
  Backend::PowerShell::Command.new do
    using 'find_installed_application.ps1'
    exec "(FindInstalledApplication -appName '#{package}' #{version_selection}) -eq $true"
  end
end