humblehacker
10/13/2022, 2:10 AMrunCommand()
from kscript-tools. Anyone familiar with this? I've added the dependency to my script:
@file:DependsOn("com.sealwu:kscript-tools:1.0.2")
and I've added a line to my script to test it:
"ls".runCommand()
But when I run the script, runCommand()
can't be found:
error: unresolved reference: runCommand
If I run the script from IDEA using
kscript --idea myscript.kts
it works fine. It's only when I run the script from the command line that it fails.
Anyone have any idea what I'm doing wrong?humblehacker
10/13/2022, 2:10 AM#!/usr/bin/env kscript
@file:DependsOn("com.sealwu:kscript-tools:1.0.2")
"ls".runCommand()
humblehacker
10/13/2022, 2:18 AMrunCommand
fixes the problem!
#!/usr/bin/env kscript
@file:DependsOn("com.sealwu:kscript-tools:1.0.2")
import runCommand
"ls".runCommand()
Still not sure why it's necessary though. 🤷Big Chungus
10/13/2022, 7:20 AM