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

Inconsistent expansion of env vars

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Fixed
    • Icon: Major Major
    • core
    • None

      In same cases it can happen that env. vars. are not expanded in a consistent way, when some variables are expanded and some aren't.

      Reproducer:
      -----------
      Setup parametrized build with 3 string parameters:
      A="aaa"
      C="ccc"
      B=$A$C
      and add shell build step which prints B parameter
      echo $B

      Output is aaa$C, while one would expect aaaccc (or $A$C).

      This is caused by Launcher.inherit() method, which adds variables into resolver and eventually expand them in the same loop (on alphabetically sorted map), thus when expanding $B, $A is already in resolver and gets expanded, while $C is not there yet and thus remains unexpanded.

            Unassigned Unassigned
            vjuranek vjuranek
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Created:
              Updated:
              Resolved: