1

I can't execute a simple Kotlin script because of compilation failed due to an invalid argument.

This is my Kotlin script:

#!/usr/bin/env kscript 
println("Helloooo")

Then I've writter my very simple script, I've add executable permission to execute it: chmod u+x SomeScript.kts

This is the error:

$ ./SomeScript.kts
[kscript] [ERROR] compilation of './SomeScript.kts' failed
error: invalid argument: -d
info: use -help for more information

How can I fix it?

gmgulla
  • 11
  • 1
  • Solved! I had already properly installed kscript via Homebrew, but, for some reason, only `kotlinc` was out of the PATH. I added it, and now it works! – gmgulla Nov 10 '20 at 10:27

1 Answers1

1

Have you install right kscript? Check here https://github.com/holgerbrandl/kscript in base your system OS

dommy1985
  • 73
  • 1
  • 6