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

powershell : warning: already initialized constant

    XMLWordPrintable

Details

    • Bug
    • Status: Resolved
    • Normal
    • Resolution: Fixed
    • None
    • None
    • powershell
    • None
    • MODULES Bug Template
    • Needs 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

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

            Dates

              Created:
              Updated:
              Resolved:

              Zendesk Support