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

CliBuilder should treat GString like Strings when specifying options

    XMLWordPrintableJSON

Details

    • Improvement
    • Status: Closed
    • Major
    • Resolution: Fixed
    • 1.7.6, 1.8-beta-3
    • 1.7.7, 1.8-beta-4
    • None
    • None

    Description

      At the moment, the code below fails:

      def user = 'scott'
      def pass = 'tiger'
      def cli = new CliBuilder(usage: 'dbqry [options]')
      cli.dbusername("Database username [default $user]")
      cli.dbpassword("Database password [default $pass]")
      

      Adding toString() after the GStrings works but is not very Groovy.

      Attachments

        Activity

          People

            paulk Paul King
            paulk Paul King
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: