Upgrade nodejs to the latest version from the repo
This is possible in newer versions of the nodejs cookbook, by setting the `node["nodejs"]["package_action"]["nodejs"]` attribute to `:upgrade`
This commit is contained in:
@@ -1,11 +1,13 @@
|
||||
node['nodejs']['npm_packages'].each do |pkg|
|
||||
pkg_action = pkg.key?('action') ? pkg['action'] : :install
|
||||
f = npm_package "nodejs_npm-#{pkg['name']}-#{pkg_action}" do
|
||||
action :nothing
|
||||
package pkg['name']
|
||||
if node['nodejs'].key?('npm_packages')
|
||||
node['nodejs']['npm_packages'].each do |pkg|
|
||||
pkg_action = pkg.key?('action') ? pkg['action'] : :install
|
||||
f = npm_package "nodejs_npm-#{pkg['name']}-#{pkg_action}" do
|
||||
action :nothing
|
||||
package pkg['name']
|
||||
end
|
||||
pkg.each do |key, value|
|
||||
f.send(key, value) unless key == 'name' || key == 'action'
|
||||
end
|
||||
f.action(pkg_action)
|
||||
end
|
||||
pkg.each do |key, value|
|
||||
f.send(key, value) unless key == 'name' || key == 'action'
|
||||
end
|
||||
f.action(pkg_action)
|
||||
end if node['nodejs'].key?('npm_packages')
|
||||
end
|
||||
|
||||
Reference in New Issue
Block a user