]> git.openstreetmap.org Git - chef.git/blobdiff - cookbooks/nodejs/providers/package.rb
Use systemd to manage munin-node on Ubuntu 15.10
[chef.git] / cookbooks / nodejs / providers / package.rb
index ec20d157d023b9aa382aa1dee6aeb065e87b8471..3a33040635c06b8cc0dcd642cd4b8bdd16a4bdae 100644 (file)
@@ -27,7 +27,7 @@ def load_current_resource
 
   @current_resource = Chef::Resource::NodejsPackage.new(new_resource.name)
   @current_resource.package_name(new_resource.package_name)
-  if package = @packages[@current_resource.package_name]
+  if (package = @packages[@current_resource.package_name])
     @current_resource.version(package["version"])
   end
   @current_resource
@@ -40,7 +40,7 @@ action :install do
     package_name = new_resource.package_name
   end
 
-  unless @packages.include?(new_resource.package_name)
+  if !@packages.include?(new_resource.package_name)
     shell_out!("npm install --global #{package_name}")
     new_resource.updated_by_last_action(true)
   else