Method: Specinfra::Command::Openbsd::Base::Package.check_is_installed

Defined in:
lib/specinfra/command/openbsd/base/package.rb

.check_is_installed(package, version = nil) ⇒ Object


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

def check_is_installed(package, version=nil)
  if version
    "pkg_info -a | cut -d ' ' -f 1 | grep  #{escape(package)}-#{escape(version)}"
  else
    "pkg_info -a | cut -d ' ' -f 1 | grep  #{escape(package)}"
  end
end