with kotlin 1.6.20 we can maybe have the user pass...
# github-workflows-kt
n
with kotlin 1.6.20 we can maybe have the user pass
__FILE__
into
toYaml
and
writeToFile
functions.. then we can locate the current script and find the target file no matter what directly the script gets executed from.. too bad there is no good way to get it at runtime in the library..
p
sorry, I don't get it. what problem do you want to solve? 🙂 for now it's assumed that the script is called from repository root BTW is something going to change in 1.6.20? Adding
__FILE__
to scripting support?
n
yeah: https://github.com/jetbrains/kotlin/pull/4597 its not a big issue to have scripts executed only from the repo root, but wouldn't it be nice to make it work no matter where you run a script from ?
p
Let's revisit it once 1.6.20 is out and we can play with it. In general every feature is nice to add, but I ad library owner have to consider extra complexity :)