Skip to content

Commit

Permalink
Do not crash when referring to a fact key without quoting it
Browse files Browse the repository at this point in the history
Fixes #118
  • Loading branch information
chutzimir committed Apr 25, 2023
1 parent cc275ca commit 14b3a77
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/puppet-lint/plugins/legacy_facts/legacy_facts.rb
Original file line number Diff line number Diff line change
Expand Up @@ -117,7 +117,7 @@ def check

# This matches legacy facts defined in the fact hash that use the top scope
# fact assignment.
if token.value.start_with?('::facts[')
if token.value.start_with?("::facts['")
fact_name = token.value.match(%r{::facts\['(.*)'\]})[1]

# This matches legacy facts defined in the fact hash.
Expand Down

0 comments on commit 14b3a77

Please sign in to comment.