Uploaded image for project: 'Jenkins'
  1. Jenkins
  2. JENKINS-28328

Appending to non-existent environment variable, causes it to grow without bounds

    • Icon: Bug Bug
    • Resolution: Unresolved
    • Icon: Minor Minor
    • envinject-plugin
    • None
    • Linux
      Plugin:1.92.2,
      Jenkins: 1.612

      In the Build Environment section, I'm using envinject to set a couple variables via "Properties Content". One entry is:

      LD_LIBRARY_PATH=${WORKSPACE}/ref/dist/lib:$LD_LIBRARY_PATH
      

      Where I run into trouble is if a slave's environment doesn't already have LD_LIBRARY_PATH set. In these cases, what ends up happening is LD_LIBRARY_PATH gets set to a repeating sequence of:

      <worksdpace>/ref/dist/lib:<workspace>/ref/dist/lib:...:<workspace>/ref/dist/lib:$LD_LIBRARY_PATH
      

      Where the value I'm prepending is present dozens of times followed by a non-expanded "$LD_LIBRARY_PATH".

      What I would expect is that the following would be injected into the environment: "<workspace>/ref/dist/lib:"

          [JENKINS-28328] Appending to non-existent environment variable, causes it to grow without bounds

          There are no comments yet on this issue.

            gbois Gregory Boissinot
            mears Josh Davidson
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated: