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

Unexpected behaviour when using different capitalization for variable name on windows

    • Icon: Bug Bug
    • Resolution: Unresolved
    • Icon: Critical Critical
    • envinject-plugin
    • None

      On windows environment variable names an not case sensitive.
      If you use different capitalization in variable names with the envinject plugin the results are unexpected. To reproduce create a envinject build step or build environment setting with the following content:

      Foo=test
      FOO=bar;$FOO
      

      If I run the job on a windows slave I would expect the result to be:

      echo %FOO%
      bar;test
      

      But instead I get:

      echo %FOO%
      bar;bar;bar;bar;bar;bar;bar;bar;.........bar;bar;bar;$FOO
      

      On the "Environment Variables" page on the job result page there are two entries with the different capitalization but also not filled correctly. I would expect only one.

      I found out about this because on a freshly installed windows machine the Path environment variable is "Path" but I used "PATH" in the envinject plugin which gave me quite some headache.

          [JENKINS-23615] Unexpected behaviour when using different capitalization for variable name on windows

          There are no comments yet on this issue.

            gbois Gregory Boissinot
            andreas_kleber Andreas Kleber
            Votes:
            1 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated: