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

Using non-space-separated (concatenated) DOS-style environment variables with X-shell do not get subsitituted to UNIX properly

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Won't Do
    • Icon: Major Major
    • xshell-plugin
    • None
    • Windows/Unix

      With X-shell, you should be able to use either DOS-style environment variables (i.e. %VARIABLE%), or Unix style variables ($VARIABLE, or with braces: ${VARIABLE}, and both styles should work on either platform. If two Unix variables are to be used concatenated together (i.e. not space separated) then braces must be used, as in:" ${VARIABLE_1}${VARIABLE2}. The equivalent of this in DOS is %VARIABLE_1%%VARIABLE_2%.

      The issue is: When two non-space separated variables are specified in an X-shell commandline using the DOS-style variable specification (%XXX%, they should be converted to Unix format by the use of braces, but they are not, and so they do not get substituted properly on UNIX.

      Test case:

      1) the following Unix-style non-space separated variables work properly with X-shell on both Windows or Unix:

      Command as given to X-shell:
      echo doing Unix-style variables separate $Generation $Component $Stream and together with braces ${Generation}${Component}${Stream}.log

      Results - all variables whether space separated or not get substituted:

      doing Unix-style variables separate generation_x component_x stream_x and together with braces generation_x_component_x_stream_x.log

      2) the following DOS-style non-space separated variables do NOT work properly with X-shell on Unix (work only on DOS)

      Command:
      echo doing DOS-style variables separate %Generation% %Component% %Stream% and together %Generation%%Component%%Stream%.log

      Results - all variables do not get substituted on UNIX (DOS okay):

      doing DOS-style variables separate generation_x component_x stream_x and together $Generation_$Component_stream_x.log

            Unassigned Unassigned
            rickybobpat Rick Patterson
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated:
              Resolved: