Uploaded image for project: 'Puppet'
  1. Puppet
  2. PUP-9816

puppet parser validate version 6.6.0 does not accept STDIN properly

    XMLWordPrintable

Details

    • 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

      Attachments

        Activity

          People

            jesse Jesse Scott
            kscherer Konrad Scherer
            Votes:
            0 Vote for this issue
            Watchers:
            6 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Zendesk Support