Uploaded image for project: 'Groovy'
  1. Groovy
  2. GROOVY-3043

Command line arguments containing * (asterisk) not passed correctly

Attach filesAttach ScreenshotVotersWatch issueWatchersCreate sub-taskLinkCloneUpdate Comment AuthorReplace String in CommentUpdate Comment VisibilityDelete Comments
    XMLWordPrintableJSON

Details

    Description

      Groovy does weird things with command line arguments containing *. Makes it very difficult to pass in things like file specs, ant specs and regex expresssions!!! A simple program that prints out the length of the args parameter passed into main procedure - a few are correct but most are wrong:

      >groovy fail test
      args length: 1
      
      >groovy fail *
      args length: 3
      
      >groovy fail **
      args length: 0
      
      >groovy fail "**"
      args length: 0
      
      >groovy fail "test"  " *"
      args length: 2
      
      >groovy fail "test"  "*"
      args length: 1
      
      >groovy fail "test   *"
      args length: 1
      
      >groovy fail "*test*"
      args length: 0
      
      >groovy fail "*test*"
      args length: 0
      
      >groovy fail " *test*"
      args length: 1
      

      Attachments

        Activity

          This comment will be Viewable by All Users Viewable by All Users
          Cancel

          People

            blackdrag Jochen Theodorou
            bob.swift Bob Swift
            Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Slack

                Issue deployment