Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[2.4.2] Mistaken variable format crashes puppet-lint #945

Closed
ashemedai opened this issue May 20, 2021 · 1 comment
Closed

[2.4.2] Mistaken variable format crashes puppet-lint #945

ashemedai opened this issue May 20, 2021 · 1 comment

Comments

@ashemedai
Copy link

Did some quick searching but could not easily spot a similar issue reported, apologies if I missed the obvious.

puppet-lint version: 2.4.2
ruby version: 2.6.3-p62
platform: universal.x86_64-darwin20

While trying to fix a single variable in string warning, I managed to crash puppet-lint because my tired mind had "fixed" the case by writing the following (notice the left in curly braces):

file { ${configuration_directory}:
    ensure  => directory,
    owner   => 'owner',
    group   => 'group',
    mode    => '0700',
    purge   => true,
    recurse => true,
}

Stack trace thrown:
error:

NoMethodError: undefined method `type' for nil:NilClass
puppet-repo/vendor/bundle/ruby/2.6.0/gems/puppet-lint-trailing_newline-check-1.1.0/lib/puppet-lint/plugins/check_trailing_newline.rb:5:in `check'
puppet-repo/vendor/bundle/ruby/2.6.0/gems/puppet-lint-2.4.2/lib/puppet-lint/checkplugin.rb:21:in `run'
puppet-repo/vendor/bundle/ruby/2.6.0/gems/puppet-lint-2.4.2/lib/puppet-lint/checks.rb:61:in `block in run'
puppet-repo/vendor/bundle/ruby/2.6.0/gems/puppet-lint-2.4.2/lib/puppet-lint/checks.rb:58:in `each'
puppet-repo/vendor/bundle/ruby/2.6.0/gems/puppet-lint-2.4.2/lib/puppet-lint/checks.rb:58:in `run'
puppet-repo/vendor/bundle/ruby/2.6.0/gems/puppet-lint-2.4.2/lib/puppet-lint.rb:205:in `run'
puppet-repo/vendor/bundle/ruby/2.6.0/gems/puppet-lint-2.4.2/lib/puppet-lint/tasks/puppet-lint.rb:83:in `block (3 levels) in define'
puppet-repo/vendor/bundle/ruby/2.6.0/gems/puppet-lint-2.4.2/lib/puppet-lint/tasks/puppet-lint.rb:81:in `each'
puppet-repo/vendor/bundle/ruby/2.6.0/gems/puppet-lint-2.4.2/lib/puppet-lint/tasks/puppet-lint.rb:81:in `block (2 levels) in define'
puppet-repo/vendor/bundle/ruby/2.6.0/gems/rake-13.0.3/lib/rake/file_utils_ext.rb:58:in `verbose'
puppet-repo/vendor/bundle/ruby/2.6.0/gems/puppet-lint-2.4.2/lib/puppet-lint/tasks/puppet-lint.rb:75:in `block in define'
puppet-repo/vendor/bundle/ruby/2.6.0/gems/rake-13.0.3/lib/rake/task.rb:281:in `block in execute'
puppet-repo/vendor/bundle/ruby/2.6.0/gems/rake-13.0.3/lib/rake/task.rb:281:in `each'
puppet-repo/vendor/bundle/ruby/2.6.0/gems/rake-13.0.3/lib/rake/task.rb:281:in `execute'
puppet-repo/vendor/bundle/ruby/2.6.0/gems/rake-13.0.3/lib/rake/task.rb:219:in `block in invoke_with_call_chain'
@ashemedai
Copy link
Author

Closing this, since the repo now lives somewhere else and nobody could be arsed to duplicate the issues.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant