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

Module build with malformed type.rb fails to build or return error

    Details

    • Type: Bug
    • Status: Resolved
    • Priority: Trivial
    • Resolution: Fixed
    • Affects Version/s: PUP 3.4.3
    • Fix Version/s: None
    • Component/s: Modules
    • Labels:
      None
    • Environment:

      CentOS64

    • Template:

      Description

      Puppet 3.4.3-1.el6

      A minor inconvenience when building modules.

      Running

      puppet module build

      on a module with a malformed custom type results in the build failing with no error returned, even if debug and verbose flags are set it just returns a failure exitcode. Took a while to pinpoint the rogue file without any feedback from the build.

      You can replicate this as follows:

      puppet module generate malformed-type
      mkdir -p malformed-type/lib/puppet/type
      vim malformed-type/lib/puppet/type/malformed.rb
      

      Setting the malformed type to:

      Puppet::Type.newtype(:malformed) do
        @doc = "Dummy malformed type"
        ensurable
      

      Building this module now fails without warning

      puppet module build ./malformed-type --debug --verbose
      echo $?
      

      Is there a way of validating the ruby parts of the modules, the parser returns the Ruby DSL is deprecated warning.

        Attachments

          Activity

            People

            • Assignee:
              Unassigned
              Reporter:
              mccabe John McCabe
              QA Contact:
              Kurt Wall
            • Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved:

                Zendesk Support