Details
-
Bug
-
Status: Resolved
-
Minor
-
Resolution: Fixed
-
PUP 6.5.0, PUP 6.6.0
-
Puppet Developer Experience
-
Needs Assessment
-
Bug Fix
-
Resolved an issue where `puppet parser validate` would fail with an error when a valid manifest was passed in via the STDIN pipe.
-
Needs Assessment
Description
Puppet Version: 6.6.0 and 6.5.0
Puppet Server Version: N/A
OS Name/Version: Ubuntu 19.04 using bionic packages 6.6.0-1bionic
Passing code over stdin to puppet parser fails with 'Error: undefined method `message' for nil:NilClass'. I was able to reproduce with 6.5.0 and 6.6.0, but not with 6.4.2
Desired Behavior:
Validation of code using filename or stdin should be identical
Actual Behavior:
> touch foo.pp
> puppet parser validate foo.pp
> cat foo.pp | puppet parser validate
Error: undefined method `message' for nil:NilClass
Error: Try 'puppet help parser validate' for usage
I noticed this because emacs flycheck uses stdin to do syntax checking.
Note that the documentation (man puppet parser) states that this is a valid way to submit output:
EXAMPLES
Validate from STDIN:
$ cat init.pp | puppet parser validate