Skip to content

Fail from compiler: /bin/sh: groovy: command not found #26

@f-lima

Description

@f-lima

If you try to run a groovy script, you get:

Building /Users/flima/dev/test/groovy/multiline_string.groovy in /Users/flima/dev/test/groovy/...

NodeDebugUtils.js:114 [node-log 7:31:20 AM] exec groovy "/Users/flima/dev/test/groovy/multiline_string.groovy" from /Users/flima/dev/test/groovy/
main.js:68 Fail from compiler: /bin/sh: groovy: command not found

But if you try get a groovy version directly from Console inside Brackets, you get:

groovy --version

VM507:2 Uncaught SyntaxError: Unexpected identifier(…)
InjectedScript._evaluateOn @ VM414:878
InjectedScript._evaluateAndWrap @ VM414:811
InjectedScript.evaluate @ VM414:667

Groovy is installed and works if I run directly from Mac Terminal.

Definition in edit builder:

{
"name": "Groovy",
"cmd": "groovy $FILE",
"file_reg": "(.+):",
"line_reg": ":([0-9]+)",
"msg_reg": "[0-9]+[ |\n]*([\w\W]+)",
"seperator": "\n"
}

Code of multiline_string.groovy:

def find = 'A'
def s = """
SELECT *
FROM CLIENT
"""
println "============================="
println s[1..-2]
println "============================="

Thanks for your attention

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions