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

Backslashes must be doubled for them to be registered as a single backslash by the Setenv plugin

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Won't Fix
    • Icon: Minor Minor
    • other
    • None
    • Windows 2008 Server R2, Enterprise Edition, x64

      IMPORTANT! I wasn't able to locate the Setenv plugin in the list of components from JIRA.

      IMPORTANT! Solving this issue may lead to problems for users relying on the current behavior.

      When variable name and values to be set by the Setenv plugin are configured in the project configuration page, the user must be careful to double any backslash that is part of a variable value so that it can be registered as a single backslash by the Setenv plugin.

      This problem is most annoying when Hudson runs on Windows because it is very often that the user will require to set some env vars with paths to various EXEs and these will contain a lot of backslashes.

      For example, if I have a variable that stores the path to "7z.exe", I must write it like this in the project configuration page:

      PathTo7z=c:\\Program Files\\7-zip\\7z.exe

      and then it will be set by Setenv with the value:

      PathTo7z=c:\Program Files\7-zip\7z.exe

      I don't think this would cause any problems on other operating systems because, as a user, I expect that the values that are seen in the project configuration page are also the values set for the environment variables.

            Unassigned Unassigned
            bogdaniosif bogdaniosif
            Votes:
            1 Vote for this issue
            Watchers:
            4 Start watching this issue

              Created:
              Updated:
              Resolved: