Backslashes in Environment / Script-Variables are not quoted correctly for Groovy

XMLWordPrintable

    • Type: Bug
    • Resolution: Fixed
    • Priority: Minor
    • Component/s: scripttrigger-plugin
    • None
    • Environment:
      Windows

      Under windows, the variable "WORKSPACE" usually contains backward-shlashes (i.e. "C:\Jenkins\foo\bar"). Trying to assign a string variable like

      String baz = "$WORKSPACE
      sandbox";

      is not possible. After the variables are substitued Groovy complains about illegal character, since the statement looks like this:

      String baz = "C:\Jenkins\foo\bar
      sandbox";
      ^ illegal escape sequence

            Assignee:
            Gregory Boissinot
            Reporter:
            Peter Schaefer
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

              Created:
              Updated:
              Resolved: