Method: Specinfra::Command::Solaris::V10::Package.check_is_installed

Defined in:
lib/specinfra/command/solaris/v10/package.rb

.check_is_installed(package, version = nil) ⇒ Object

[View source]

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

def check_is_installed(package, version=nil)
  cmd = "pkginfo -q  #{escape(package)}"
  if version
    cmd = "#{cmd} | grep -- #{escape(version)}"
  end
  cmd
end