Uploaded image for project: 'Modules'
  1. Modules
  2. MODULES-7067

powershell : warning: already initialized constant

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Ready for CI
    • Priority: Normal
    • Resolution: Unresolved
    • Affects Version/s: None
    • Fix Version/s: None
    • Component/s: None
    • Labels:
      None
    • Template:
      MODULES Bug Template
    • Method Found:
      Needs Assessment
    • QA Risk Assessment:
      Needs Assessment

      Description

      Basic Info
      Module Version: 2.1.4
      Puppet Version: 4.10.10
      OS Name/Version: Redhat 6.9

      When using puppet device with multiple devices in one device config file, puppet is printing warnings to stderr about already initialized constant.

      This can be fixed by using "unless defined".

      Desired Behavior:

      Not initialising contants multiple times. 

      Actual Behavior:

      $ puppet device --deviceconfig /etc/puppetlabs/puppet/device/device.conf
      /opt/puppetlabs/puppet/cache/devices/device-x/lib/puppet/provider/exec/powershell.rb:30: warning: already initialized constant POWERSHELL_MODULE_UPGRADE_MSG
      /opt/puppetlabs/puppet/cache/devices/device-x/lib/puppet/provider/exec/powershell.rb:30: warning: previous definition of POWERSHELL_MODULE_UPGRADE_MSG was here

        Attachments

          Activity

            People

            Assignee:
            Unassigned
            Reporter:
            btoonk Bas Toonk
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Dates

              Created:
              Updated:

                Zendesk Support