brackets-integrated-development icon indicating copy to clipboard operation
brackets-integrated-development copied to clipboard

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

Open f-lima opened this issue 7 years ago • 1 comments

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

f-lima avatar Apr 05 '17 10:04 f-lima

Putting the entire path to groovy worked like I saw at issue about Python. Groovy was installed by sdkman. I don't know why it was not found before, but just when I give the entire path. Something with node.js? Because worked using Mac Terminal app.

f-lima avatar Apr 05 '17 11:04 f-lima