Groovy
  1. Groovy
  2. GROOVY-7777

groovysh cannot load script with shebang

    Details

    • Type: Bug Bug
    • Status: Closed
    • Priority: Major Major
    • Resolution: Fixed
    • Affects Version/s: 2.4.6
    • Fix Version/s: 2.4.7
    • Component/s: Groovysh
    • Labels:
      None

      Description

      The following file runs nicely when executing $ ./shebang.groovy :

      shebang.groovy
      #!/usr/bin/env groovy
      println "Hello from the Shebang"
      

      But, loading that file into groovysh results in:
      $ groovysh shebang.groovy
      groovysh_parse: 2: unexpected char: '#' @ line 2, column 1.

      tested under Ubuntu14.04 with Groovy 2.4.6

        Activity

        Hide
        ASF GitHub Bot added a comment -

        GitHub user jwagenleitner opened a pull request:

        https://github.com/apache/groovy/pull/297

        GROOVY-7777 - groovysh cannot load script with shebang

        You can merge this pull request into a Git repository by running:

        $ git pull https://github.com/jwagenleitner/groovy GROOVY-7777

        Alternatively you can review and apply these changes as the patch at:

        https://github.com/apache/groovy/pull/297.patch

        To close this pull request, make a commit to your master/trunk branch
        with (at least) the following in the commit message:

        This closes #297


        commit 13cc9ff55ca334693774ae7ba531b2276ee693cc
        Author: John Wagenleitner <jwagenleitner@apache.org>
        Date: 2016-03-22T01:22:53Z

        GROOVY-7777 - groovysh cannot load script with shebang


        Show
        ASF GitHub Bot added a comment - GitHub user jwagenleitner opened a pull request: https://github.com/apache/groovy/pull/297 GROOVY-7777 - groovysh cannot load script with shebang You can merge this pull request into a Git repository by running: $ git pull https://github.com/jwagenleitner/groovy GROOVY-7777 Alternatively you can review and apply these changes as the patch at: https://github.com/apache/groovy/pull/297.patch To close this pull request, make a commit to your master/trunk branch with (at least) the following in the commit message: This closes #297 commit 13cc9ff55ca334693774ae7ba531b2276ee693cc Author: John Wagenleitner <jwagenleitner@apache.org> Date: 2016-03-22T01:22:53Z GROOVY-7777 - groovysh cannot load script with shebang
        Hide
        ASF GitHub Bot added a comment -

        Github user asfgit closed the pull request at:

        https://github.com/apache/groovy/pull/297

        Show
        ASF GitHub Bot added a comment - Github user asfgit closed the pull request at: https://github.com/apache/groovy/pull/297
        Hide
        John Wagenleitner added a comment -

        Thanks for reporting the issue.

        Show
        John Wagenleitner added a comment - Thanks for reporting the issue.

          People

          • Assignee:
            John Wagenleitner
            Reporter:
            paul
          • Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved:

              Development