Skip to content

Commit e61b71c

Browse files
committed
Prefer .parse over .load
1 parent fb81481 commit e61b71c

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

lib/puppet/parser/functions/load_module_metadata.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ module Puppet::Parser::Functions
2424

2525
metadata_exists = File.exists?(metadata_json) # rubocop:disable Lint/DeprecatedClassMethods : Changing to .exist? breaks the code
2626
if metadata_exists
27-
metadata = JSON.load(File.read(metadata_json))
27+
metadata = JSON.parse(File.read(metadata_json))
2828
else
2929
metadata = {}
3030
raise(Puppet::ParseError, "load_module_metadata(): No metadata.json file for module #{mod}") unless allow_empty_metadata

0 commit comments

Comments
 (0)