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

NoMethodError: undefined method `end_with?' for nil:NilClass #727

Closed
sachingupta771 opened this issue Aug 3, 2017 · 1 comment
Closed
Labels
Milestone

Comments

@sachingupta771
Copy link


puppet-lint version: 2.3.0
ruby version: 2.1.9-p490
platform: x86_64-linux
file path: modules//profiles/manifests/user.pp
file contents:

define profiles::user ($user=$title,$group,$homedir)
{
    group { $group:
       ensure    => present,
    } ->
    user { $user:
      comment   => "Creating user $user",
      home      => "$homedir",
      ensure    => present,
      groups    => $group,
      managehome => true,
    } ->
    exec { "${user}_home":
       path => "/usr/bin:/usr/sbin:/bin:/sbin",
       command => "mkdir -p $homedir"",
       onlyif => "test ! -e $homedir",
       logoutput => true,
    } 
}


error:

NoMethodError: undefined method `end_with?' for nil:NilClass
@rodjek rodjek added this to the Next release (2.3.0 maybe?) milestone Aug 6, 2017
@rodjek rodjek added the bug label Aug 6, 2017
@rodjek
Copy link
Owner

rodjek commented Aug 6, 2017

Hi @sachingupta771

The underlying reason that this failed is because you have an extra " on line 15. I've opened a PR to improve the handling of this situation so that a more helpful error message is provided.

Thanks for the bug report!

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

No branches or pull requests

2 participants