File tree 1 file changed +4
-4
lines changed
lib/puppet-lint/plugins/legacy_facts 1 file changed +4
-4
lines changed Original file line number Diff line number Diff line change @@ -117,12 +117,12 @@ def check
117
117
118
118
# This matches legacy facts defined in the fact hash that use the top scope
119
119
# fact assignment.
120
- if token . value . start_with? ( " ::facts['" )
121
- fact_name = token . value . match ( %r{::facts\[ '(.*)'\] } ) [ 1 ]
120
+ if token . value . match ( %r{ ::facts\[ '(.*)' \] } )
121
+ fact_name = token . value . match ( %r{::facts\[ '(.*)'\] } ) [ 1 ]
122
122
123
123
# This matches legacy facts defined in the fact hash.
124
- elsif token . value . start_with? ( " facts['" )
125
- fact_name = token . value . match ( %r{facts\[ '(.*)'\] } ) [ 1 ]
124
+ elsif token . value . match ( %r{ facts\[ '(.*)' \] } )
125
+ fact_name = token . value . match ( %r{facts\[ '(.*)'\] } ) [ 1 ]
126
126
127
127
# This matches using legacy facts in a the new structured fact. For
128
128
# example this would match 'uuid' in $facts['uuid'] so it can be converted
You can’t perform that action at this time.
0 commit comments