I am using the below line to read an environment variable from my Kotlin code.
val accountPasswords = System.getProperty("AccountPasswords")
I have stored this environment variable in my Mac OS machine in ~/.bash_profile, in the below shown way.
export AccountPasswords=myPassword
When I print this accountPasswords variable I get {$AccountPasswords} instead of the real value. I went on to print the properties and below is how I get it.
key: AccountPasswords value: {$AccountPasswords}
How can I print the actual value? What am I doing wrong here? This works fine when I run it in a Linux machine. Any advice would be much appreciated.