is there a better way to do this? ``` ...
# announcements
x
is there a better way to do this?
Copy code
url = uri(System.getenv("JRS_S3_URI") ?: uri(""))
q
most pretty looking u mean? 🙂
x
yes, and or I wasn't sure if there way a better way of getting env in kotlin
q
u can exclude the second one uri() only ""
i guess
why here is uri(uri("")) if System.getenv("JRS_S3_URI") is null?
x
ah, so kotlin also doesn't have a better way of doing a getenv? I thought maybe it would, but hadn't checked
yeah weird, my parens are in the wrong place there, huh
but that does work
real question maybe is should I go pester the kotlin dsl people
q
uri(System.getenv("JRS_S3_URI") ?: "")
x
as in groovy, it was fine with this being null when I wasn't publishing
q
u can write it by yourself
could u plz show it?
x
show what?
q
how u imagine this groovy-style builder
j
There is a great library for typed configurations from env: https://github.com/daviddenton/configur8
👍 1