Skip to content

Commit 3cc49c2

Browse files
duroguilhem
authored andcommitted
Disable max_nesting
1 parent 047b67a commit 3cc49c2

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

libraries/nodejs_helper.rb

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ def npm_dist
77

88
require 'open-uri'
99
require 'json'
10-
result = JSON.parse(URI.parse("https://registry.npmjs.org/npm/#{node['nodejs']['npm']['version']}").read)
10+
result = JSON.parse(URI.parse("https://registry.npmjs.org/npm/#{node['nodejs']['npm']['version']}", :max_nesting => false).read)
1111
ret = { 'url' => result['dist']['tarball'], 'version' => result['_npmVersion'], 'shasum' => result['dist']['shasum'] }
1212
Chef::Log.debug("Npm dist #{ret}")
1313
return ret
@@ -27,7 +27,7 @@ def npm_list(path = nil)
2727
else
2828
cmd = Mixlib::ShellOut.new('npm list -global -json')
2929
end
30-
JSON.parse(cmd.run_command.stdout)
30+
JSON.parse(cmd.run_command.stdout, :max_nesting => false)
3131
end
3232

3333
def npm_package_installed?(package, version = nil, path = nil)

0 commit comments

Comments
 (0)