You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
We use functions .reduce .unique .sort .each we get the Whoops! error and "NoMethodError: undefined method `[]' for nil:NilClass". It passed puppet-lint 2.5.2 without errors.
Expected Behavior
puppet-lint should handle the functions .reduce .unique .sort .each in the .pp file.
Steps to Reproduce
Run puppet-lint on *.pp with functions .reduce .unique .sort .each, for example:
Describe the Bug
We use functions .reduce .unique .sort .each we get the Whoops! error and "NoMethodError: undefined method `[]' for nil:NilClass". It passed puppet-lint 2.5.2 without errors.
Expected Behavior
puppet-lint should handle the functions .reduce .unique .sort .each in the .pp file.
Steps to Reproduce
Run puppet-lint on *.pp with functions .reduce .unique .sort .each, for example:
.reduce([]) | $memo,$value | {
$memo + keys($ ::facts[mountpoints]).grep($value)
if ( $value[0] == '/' ) {
if ( $validate_mpt and
( ! $absent_if_nompt ) and
( $::facts[mountpoints][$value] == undef ) ) {
$memo
} else {
$memo + [ $value ]
}
} else {
}
}
.unique
.sort
Environment
Additional Context
We are converting from Puppet V6 to Puppet V7 when we encounter this problem.
puppet-lint-output.txt
The text was updated successfully, but these errors were encountered: