lib/specinfra/command/debian/base/package.rb in specinfra-2.0.0.beta40 vs lib/specinfra/command/debian/base/package.rb in specinfra-2.0.0.beta41

- old
+ new

@@ -10,16 +10,16 @@ cmd end alias :check_is_installed_by_apt :check_is_installed - def install(package, version=nil) + def install(package, version=nil, option='') if version full_package = "#{package}=#{version}" else full_package = package end - "DEBIAN_FRONTEND='noninteractive' apt-get -y install #{full_package}" + "DEBIAN_FRONTEND='noninteractive' apt-get -y #{option} install #{full_package}" end def get_version(package, opts=nil) "dpkg-query -f '${Status} ${Version}' -W #{package} | sed -n 's/^install ok installed //p'" end