• Icon: Bug Bug
    • Resolution: Fixed
    • Icon: Major Major
    • groovy-plugin
    • None

      The issue is caused by oversimplified parameters parsing implementation in this class: https://github.com/jenkinsci/groovy-plugin/blob/master/src/main/java/hudson/plugins/groovy/Groovy.java

              //Add groovy parameters
              if(parameters != null) {
                  StringTokenizer tokens = new StringTokenizer(parameters);
                  while(tokens.hasMoreTokens()) {
                      list.add(Util.replaceMacro(tokens.nextToken(),vr));
                  }
              }
      

      I would suggest to switch to org.apache.commons.exec.CommandLine.parse(..) method from Apache commons-exec.
      Not ideal, I know, but probably the best possible option if parsing command-line is inevitable.

      Is anyone interested in the patch? It would be very straightforward.

          [JENKINS-23617] Cannot use spaces in groovy script parameters

          enterit created issue -
          SCM/JIRA link daemon made changes -
          Resolution New: Fixed [ 1 ]
          Status Original: Open [ 1 ] New: Resolved [ 5 ]
          vjuranek made changes -
          Resolution Original: Fixed [ 1 ]
          Status Original: Resolved [ 5 ] New: Reopened [ 4 ]
          vjuranek made changes -
          Resolution New: Fixed [ 1 ]
          Status Original: Reopened [ 4 ] New: Resolved [ 5 ]
          Sebastian made changes -
          Link New: This issue is blocking JENKINS-28960 [ JENKINS-28960 ]
          R. Tyler Croy made changes -
          Workflow Original: JNJira [ 156400 ] New: JNJira + In-Review [ 195399 ]

            vjuranek vjuranek
            enterit enterit
            Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

              Created:
              Updated:
              Resolved: