Hi, Do you know if we have something like `System...
# multiplatform
g
Hi, Do you know if we have something like
System.getenv()
jvm method but that works for
js
and
native
as well?
m
On native, you should be able to use https://man7.org/linux/man-pages/man3/getenv.3.html
g
Oh, thanks, than I can create an expect/actual, I just need the js then.
m
In node, it looks like you have a
process.env
That will only work if you're running in nodeJS. I don't think the browser has access to the host environment variables
g
@mbonnin, do you think this
getenv
function will only work with Linux or would it work with other native targets too?
m
It's part of stdlib, it should be fairly portable
g
Oh, cool, thanks for letting me know
m
Linux/MacOS should work , I'm slightly less confident about windows but I don't see why it wouldn't work there as well
g
Cool, I’ll try to write a simple code to test 😉 Thanks