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

Package resource gem provider should preserve HOME env var

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Normal
    • Resolution: Duplicate
    • Affects Version/s: PUP 4.5.3
    • Fix Version/s: None
    • Component/s: None
    • Labels:
    • Template:
    • Method Found:
      Customer Feedback
    • CS Priority:
      Reviewed

      Description

      When the gem provider for the package resource is used, it will automatically look for its gemrc file in "/.gemrc" rather than the expected "/root/.gemrc" because the HOME environment variable is automatically cleared during the execution of the command at https://github.com/puppetlabs/puppet/blob/98d22be27447bcb34c33aa4a44610ab8768390f5/lib/puppet/util/execution.rb#L289-L294.

      The gem command uses the HOME environment variable in order to locate the user's gemrc file, so clearing that variable forces it to fall back to the root of the filesystem. This is not intuitive considering Puppet runs as root on the system.

        Attachments

          Issue Links

            Activity

              People

              Assignee:
              Unassigned Unassigned
              Reporter:
              adam.bottchen Adam Bottchen
              Votes:
              0 Vote for this issue
              Watchers:
              6 Start watching this issue

                Dates

                Created:
                Updated:
                Resolved:

                  Zendesk Support