How can I pass an argument to kts file? When I run...
# scripting
p
How can I pass an argument to kts file? When I run
kotlin my-script.main.kts --hello
the compiler doesn't pass it through:
error: invalid argument: --hello
v
Just a guess, but try
kotlin my-script.main.kts -- --hello
instead, the double dash on its own is often used to separate program args from forwarded args
p
Thanks, that worked!