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

xshell not resolving variables before platform slash conversion

    XMLWordPrintable

Details

    • Bug
    • Status: Closed (View Workflow)
    • Major
    • Resolution: Not A Defect
    • xshell-plugin
    • None
    • Wincows

    Description

      If I try to use xshell with a parameter field that is coded with forward slashes, it is okay if the command line is typed that way directly in the xshell Commandline fidle in the Jenkins configuration - these forward slashes get converted to backslashes for Windows. But if I store the same string with forward slashes in a variable, and use the variable on the xshell commandline, then the contents of the variable do not get the forward slashes converted to backslashes for Windows. It seems that the variable is not substituted for its value before doing the platform conversion of slashes.

      Variable definition:
      PARAMETER_WITH_FORWARD_SLASHES : //windows/lan/location

      xshell commandline: echo A Windows path not using variable is //windows/lan/location, but using a variable is $PARAMETER_WITH_FORWARD_SLASHES.

      Results from Jenkins run:

      Started by user rickybobpat
      [EnvInject] - Loading node environment variables.
      Building remotely on jen_slave (winx64 windows) in workspace c:\cygwin\local\builds\pm\j3\workspace\Test xshell
      [Test xshell] $ cmd.exe /C "echo A Windows path not using variable is "\\windows\lan\location," but using a variable is %PARAMETER_WITH_FORWARD_SLASHES%. && exit %%ERRORLEVEL%%"
      A Windows path not using variable is "\\windows\lan\location," but using a variable is //windows/lan/location.
      Finished: SUCCESS

      Attachments

        Activity

          rickybobpat Rick Patterson created issue -

          Duh. xhell is leaving the environment variables un-resolved, which is correct, and so cannot adjust the slashes. Nevermind.

          rickybobpat Rick Patterson added a comment - Duh. xhell is leaving the environment variables un-resolved, which is correct, and so cannot adjust the slashes. Nevermind.
          rickybobpat Rick Patterson made changes -
          Field Original Value New Value
          Resolution Not A Defect [ 7 ]
          Status Open [ 1 ] Closed [ 6 ]

          People

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

            Dates

              Created:
              Updated:
              Resolved: