X-Git-Url: https://git.openstreetmap.org./chef.git/blobdiff_plain/aba8e248099280195f06609e08a4f6840c956933..0d1cf0adf976a7ec2dbb1c48df552e52a96cac38:/cookbooks/nodejs/providers/package.rb?ds=inline diff --git a/cookbooks/nodejs/providers/package.rb b/cookbooks/nodejs/providers/package.rb index ec20d157d..3a3304063 100644 --- a/cookbooks/nodejs/providers/package.rb +++ b/cookbooks/nodejs/providers/package.rb @@ -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