Join Slack
Communities
Powered by
Any way to get script absolute path? Like $0 in ba...
# scripting
i
irus
06/23/2018, 1:38 PM
Any way to get script absolute path? Like $0 in bash
o
orangy
06/23/2018, 1:48 PM
I think some hackery around reflection, class loaders, URLClassLoaders, etc. can help
orangy
06/23/2018, 1:48 PM
But that would give you binary path, not source path
orangy
06/23/2018, 1:49 PM
If you own scripting host, you can pass data into a script.
i
irus
06/23/2018, 2:10 PM
Yes, It's obvious solution to pass script path to script as argument.
irus
06/24/2018, 5:45 PM
submitted
https://youtrack.jetbrains.com/issue/KT-25083
Open in Slack
Previous
Next